Fix most of the Objective-C GC problems by using the stronger CFRetain/CFRelease in wxObjcAutoRef.

Actually use wxObjcAutoRef for the wxNSViewNotificationObserver singleton to keep it from being finalized.

Copyright 2008 Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2008-02-06 20:10:07 +00:00
parent 627c8d8993
commit ddfdef64fa
4 changed files with 83 additions and 14 deletions

View File

@@ -21,6 +21,8 @@ typedef struct CGRect NSRect;
typedef struct _NSRect NSRect;
#endif
struct objc_object;
class wxWindow;
WX_DECLARE_OBJC_HASHMAP(NSView);
@@ -32,7 +34,7 @@ public:
void AssociateNSView(WX_NSView cocoaNSView);
void DisassociateNSView(WX_NSView cocoaNSView);
protected:
static void *sm_cocoaObserver;
static struct objc_object *sm_cocoaObserver;
public:
virtual wxWindow* GetWxWindow() const
{ return NULL; }