If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
- Experienced Solver
- Posts: 99
- Joined: Wed Oct 17, 2007 2:01 am
I'm using wxWidgets 2.8.6 on Windows 2000. wxImage::RemoveHandler documentation indicates the following:
Finds the handler with the given name, and removes it. The handler is not deleted.
Yet I ran into problems using it -- and after tracing found that it is
actually deleteing the handler:
image.cpp line 2319
Code: Select all
bool wxImage::RemoveHandler( const wxString& name )
wxImageHandler *handler = FindHandler(name);
delete handler; // <--- deleting!
I confirmed that the object it's deleting is in fact the same as the object my program allocated (it's not a seperate copy).
Is that delete line erroneous? Should I remove it and recompile? Or is the documentation incorrect? I'd hate to remove the delete in my program only to suffer from memory leaks when I compile for other platforms.
- Site Admin
- Posts: 6695
- Joined: Thu Sep 28, 2006 12:23 am
this is mostly a support forum, for questions regarding the internals of wx you're probably better on the amiling lists and bug tracker (and i would say bug tracker cause it really seems to be deleting it)