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/branches/WX_3_0_BRANCH@76636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -677,6 +677,7 @@ wxOSX:
|
||||
- Implement support for wxGA_VERTICAL in wxGauge (themindiswatching).
|
||||
- Add support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP
|
||||
events to wxOSX/Cocoa (Igor Korot).
|
||||
- Fix several memory leaks in wxDataViewCtrl (John Roberts).
|
||||
|
||||
|
||||
3.0.0: (released 2013-11-11)
|
||||
|
@@ -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];
|
||||
|
||||
|
Reference in New Issue
Block a user