Skip to content
Snippets Groups Projects
Commit a222b183 authored by Julien Michel's avatar Julien Michel
Browse files

DOC: Add warning about corner case of logger instance

parent 5a4ff83f
No related branches found
No related tags found
Loading
......@@ -44,6 +44,14 @@ public:
itkTypeMacro(Logger, itk::Logger);
/**
* If Logger crashes when called from the destructor of a static
* or global object, the singleton might have already been destroyed.
* You can prolong its lifetime by calling Logger::Instance()
* from that object's constructor.
*
* See https://stackoverflow.com/questions/335369/finding-c-static-initialization-order-problems#335746
*/
static Pointer Instance();
itkNewMacro(Self);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment