wxDataViewCtrl sortDescriptors memory leak wxOSX-Cocoa
|Reported by:||johnr||Owned by:||VZ|
|Keywords:||wxDataViewCtrl sortDescriptors leak wxOSX-Cocoa||Cc:|
The fix for #16210 comment 9 exposes a memory leak when setting an NSArray of sortDescriptors in dataview.mm outlineView:sortDescriptorsDidChange via setSortDescriptors.
Previous to the patch in #16210 the outlineView was released twice and rebuilt once hence the leak was not seen.
1.Apply the patch in #16210 comment 9
2.Build the dataview sample
3.Click the column 0 "Title" header to cause a resort or two
4.Close the sample and check your leaks
Below is the leak report.
Leaked Object #Address Size Responsible Library Responsible Frame OS_dispatch_source 1 0x102d30210 160 Bytes AppKit -[NSApplication _installMemoryPressureDispatchSources] OS_dispatch_source 1 0x102d30090 160 Bytes AppKit -[NSApplication _installMemoryStatusDispatchSources] __NSCFString 1 0x102cd1490 48 Bytes Foundation -[NSPlaceholderString initWithBytes:length:encoding:] Malloc 16 Bytes 1 0x102cb8640 16 Bytes minimal_cocoa -[wxCocoaOutlineDataSource outlineView:sortDescriptorsDidChange:] wxSortDescriptorObject 1 0x102cd8390 64 Bytes minimal_cocoa -[wxCocoaOutlineDataSource outlineView:sortDescriptorsDidChange:] NSMutableArray 1 0x102cbbfb0 48 Bytes minimal_cocoa -[wxCocoaOutlineDataSource outlineView:sortDescriptorsDidChange:]
Change History (8)
comment:1 Changed 10 months ago by johnr
- Patch set
comment:2 Changed 10 months ago by johnr
- Resolution set to invalid
- Status changed from new to closed
comment:3 Changed 10 months ago by johnr
- Resolution invalid deleted
- Status changed from closed to reopened
comment:6 Changed 9 months ago by VZ
- Owner set to VZ
- Resolution set to fixed
- Status changed from reopened to closed