diff --git a/docs/changes.txt b/docs/changes.txt index b69c42c9ec..3134bdbcac 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 708d5fc4ff..1f6ea86edc 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -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([m_OutlineView numberOfColumns]-1)) [m_OutlineView moveColumn:[m_OutlineView numberOfColumns]-1 toColumn:pos];