This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/27319] C++ class object destructors are not called for static class objects in a shared library when dlclose is called.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2006 22:14:40 -0000
- Subject: [Bug target/27319] C++ class object destructors are not called for static class objects in a shared library when dlclose is called.
- References: <bug-27319-12597@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-25 22:14 -------
(In reply to comment #2)
> Subject: Re: C++ class object destructors are not called
> for static class objects in a shared library when dlclose is called.
> So.... You are telling me this is not a gcc problem but a limitation in
> CYGWIN. (I'm not really surprised.)
> ... In which case I resort to my work-around of eliminating static class
> objects declared in the body of functions that will be used in the
> shared library.
> Thanks for the prompt reply,
> Harry Dellicker
No, it is a GCC bug but it is hard to get fixed really as you need to implement
an __cxa_atexit for Windows. Now Cygwin could implement __cxa_atexit but that
does not help other windows targets.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27319