// Author: David Elliott
// Modified by:
// Created: 2003/02/15
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#endif // WX_PRECOMP
#include "wx/cocoa/objc/objc_uniquifying.h"
+#include "wx/cocoa/ObjcRef.h"
#include "wx/cocoa/NSControl.h"
#import <Foundation/NSObject.h>
// ============================================================================
WX_IMPLEMENT_OBJC_INTERFACE(NSControl)
-struct objc_object *wxCocoaNSControl::sm_cocoaTarget = [[WX_GET_OBJC_CLASS(wxNSControlTarget) alloc] init];
+// New CF-retained observer (this should have been using wxObjcAutoRefFromAlloc to begin with)
+wxObjcAutoRefFromAlloc<wxNSControlTarget*> s_cocoaNSControlTarget = [[WX_GET_OBJC_CLASS(wxNSControlTarget) alloc] init];
+// For compatibility with old code
+struct objc_object *wxCocoaNSControl::sm_cocoaTarget = s_cocoaNSControlTarget;