Don't leak wxDataViewCtrl column objects in wxOSX/Cocoa.
NSOutlineView addTableColumn method takes ownership of the column passed to it, so we must release it ourselves to avoid leaking it. Closes #16223. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
10b7d587fa
commit
afae016fca
@ -2045,6 +2045,10 @@ bool wxCocoaDataViewControl::InsertColumn(unsigned int pos, wxDataViewColumn* co
|
||||
// specified position the column is first appended and - if necessary -
|
||||
// moved to its final position:
|
||||
[m_OutlineView addTableColumn:nativeColumn];
|
||||
|
||||
// it is owned, and kepy alive, by m_OutlineView now
|
||||
[nativeColumn release];
|
||||
|
||||
if (pos != static_cast<unsigned int>([m_OutlineView numberOfColumns]-1))
|
||||
[m_OutlineView moveColumn:[m_OutlineView numberOfColumns]-1 toColumn:pos];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user