detach() for FXFont

"John Selverian" <[email protected]>
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization JAHM Software
Message-ID <[email protected]>

In my destructor I have this code:

 

In windows if I do not call detach() I have a memory leak, when I call
detach() in Linux or OS X I get a segmentation fault.

 

Why the different behavior?

 

 

       if (_boldFont != nullptr)

       {

              if (_programVersionType == VERSION_TYPE::WINDOWS_VERSION)

              {

                     _boldFont->detach(); // causes linux & OSX to bomb when
exiting

              }

              _boldFont->destroy();

              delete _boldFont;

       }

 

 

 

Kind regards,

 

js

_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users
image001.gif (image/gif, 70 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.