-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory leak in singleton #86
Comments
It seems that the destructor of singleton never gets called. IMHO returning the pointer as a reference and binding it to singleton:::m_instance won't call the destructor at exit, since there is no temporary object whose lifetime got expanded. |
|
There are no singleton-instances in my code. IMHO singletons are TYPES with static methods (e.g. get_const_instance() or get_mutable_instance()). |
This is severe. We track memory leaks by looking at Visual Studio output windows after program close and this Boost.Serialization library is currently spamming the whole output window. Even if they are only initialization issues, they mask other memory leak reports. Even more severely it seems to crash our application now if a DLL's is dynamically unloaded and loaded. |
fixed |
Please note that your fix reverts to 1.65.x behaviour causing crashes (see test_dll_exported) and also |
After commit 7d216b4 (where singleton_wrapper is now allocated on the heap (include/boost/serialization/singleton.hpp:138)) Visual Studio reports memory leaks for those allocated objects.
The text was updated successfully, but these errors were encountered: