There seems to be a bug in the reference counting for all PyProperty classes wrapped in propgrid_wrap.cpp - all PyProperty instances are never garbage collected as their refcounts never return to zero.
After much investigation it looks like this issue is caused by the following piece of commented out code:
void _deleteOwningObject(void* obj)
{
// Crashes sometimes (on app exit, it seems), so we need to disable it
/*if ( Py_IsInitialized() )
{
wxPyBlock_t blocked = wxPyBeginBlockThreads();
Py_XDECREF((PyObject*)obj);
wxPyEndBlockThreads(blocked);
}*/
}
Is anyone aware of this issue and a possible fix? This causes serious memory issues in my app, which has a rather large number of property grids that are created and cleared on the fly.
Regards,
Frank Conradie