I try to improve resource leak checking of wxWidgets code.
For example: wxGrid::GetCellRenderer() returns a pointer that must be called after its usage with wxGridCellRenderer::DecRef() to release internally allocated resources.
Example code:
Here Cppcheck should not produce a warning, because the resource is deallocated correctly, but it does.
I try to improve resource leak checking of wxWidgets code.
For example:
wxGrid::GetCellRenderer()
returns a pointer that must be called after its usage withwxGridCellRenderer::DecRef()
to release internally allocated resources.Example code:
Here Cppcheck should not produce a warning, because the resource is deallocated correctly, but it does.
Library configuration
Is there something wrong with the dealloc configuration?
At the moment.. the
dealloc
function is supposed to take the allocated memory as argument. So sorry.. this is probably out of scope for now.Feel free to open a ticket.
I am not personally very interested to improve the leaks checking. But if anybody else wants to do it then I would welcome that.
Ok, thanks. I'll create a ticket.