Commit 30a981a2 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1359 Fix a bug in Singleton: singletons' memory was not correctly freed at...

#1359 Fix a bug in Singleton: singletons' memory was not correctly freed at the end of the program (found thanks to Valgrind).
parent cbd36d06
......@@ -119,8 +119,11 @@ namespace MoReFEM
* Disable public destruction: destruction of a Singleton must occur either
* through atexit() stack or through a call to Destroy().
*
* Destructor is virtual: the way destruction occurs is deleting a pointer to a Singleton<T>,
* which means without the virtuality we would get destroy properly the data attributes defined in T.
*
*/
~Singleton() = default;
virtual ~Singleton() = default;
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment