Fix memory leak when using custom renderers in wxOSX wxDataViewCtrl.
wxDataViewRendererNativeData retains a reference to the cell passed to it, so the cell must be released after passing it to wxDataViewRendererNativeData to avoid leaking it. Closes #16226. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2755,7 +2755,9 @@ wxDataViewCustomRenderer::wxDataViewCustomRenderer(const wxString& varianttype,
|
||||
m_editorCtrlPtr(NULL),
|
||||
m_DCPtr(NULL)
|
||||
{
|
||||
SetNativeData(new wxDataViewRendererNativeData([[wxCustomCell alloc] init]));
|
||||
wxCustomCell* cell = [[wxCustomCell alloc] init];
|
||||
SetNativeData(new wxDataViewRendererNativeData(cell));
|
||||
[cell release];
|
||||
}
|
||||
|
||||
bool wxDataViewCustomRenderer::MacRender()
|
||||
|
Reference in New Issue
Block a user