#include "wx/cocoa/string.h"
#include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/ObjcRef.h"
#include "wx/cocoa/NSTableDataSource.h"
#import <Foundation/NSArray.h>
return false;
// Provide the data
- m_cocoaItems = [[NSMutableArray arrayWithCapacity:n] retain];
+ m_cocoaItems = wxGCSafeRetain([NSMutableArray arrayWithCapacity:n]);
for(int i=0; i < n; i++)
{
[m_cocoaItems addObject: wxNSStringWithWxString(choices[i])];
{
[GetNSTableView() setDataSource: nil];
[m_cocoaDataSource release];
- [m_cocoaItems release];
+ wxGCSafeRelease(m_cocoaItems);
+ m_cocoaItems = nil;
DisassociateNSTableView(GetNSTableView());
}