]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/toplevel.mm
Reflect changes in stc.cpp in stc.cpp.in from which it's generated.
[wxWidgets.git] / src / cocoa / toplevel.mm
index a23e990cab669a12b59ecd430cf82431c659ce34..17ca72dde4545178e287a8768496725585413c16 100644 (file)
@@ -4,9 +4,8 @@
 // Author:      David Elliott
 // Modified by:
 // Created:     2002/11/27
 // Author:      David Elliott
 // Modified by:
 // Created:     2002/11/27
-// RCS-ID:      $Id$
 // Copyright:   (c) 2002 David Elliott
 // Copyright:   (c) 2002 David Elliott
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
 ///////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -32,6 +31,7 @@
 
 #include "wx/cocoa/autorelease.h"
 #include "wx/cocoa/string.h"
 
 #include "wx/cocoa/autorelease.h"
 #include "wx/cocoa/string.h"
+#include "wx/cocoa/ObjcRef.h"
 
 #include "wx/cocoa/objc/NSView.h"
 #include "wx/cocoa/objc/NSWindow.h"
 
 #include "wx/cocoa/objc/NSView.h"
 #include "wx/cocoa/objc/NSWindow.h"
@@ -190,8 +190,8 @@ void wxTopLevelWindowCocoa::SetNSWindow(WX_NSWindow cocoaNSWindow)
     bool need_debug = cocoaNSWindow || m_cocoaNSWindow;
     if(need_debug) wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxTopLevelWindowCocoa=%p::SetNSWindow [m_cocoaNSWindow=%p retainCount]=%d"),this,m_cocoaNSWindow,[m_cocoaNSWindow retainCount]);
     DisassociateNSWindow(m_cocoaNSWindow);
     bool need_debug = cocoaNSWindow || m_cocoaNSWindow;
     if(need_debug) wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxTopLevelWindowCocoa=%p::SetNSWindow [m_cocoaNSWindow=%p retainCount]=%d"),this,m_cocoaNSWindow,[m_cocoaNSWindow retainCount]);
     DisassociateNSWindow(m_cocoaNSWindow);
-    [cocoaNSWindow retain];
-    [m_cocoaNSWindow release];
+    wxGCSafeRetain(cocoaNSWindow);
+    wxGCSafeRelease(m_cocoaNSWindow);
     m_cocoaNSWindow = cocoaNSWindow;
     // NOTE: We are no longer using posing so we won't get events on the
     // window's view unless it was explicitly created as the wx view class.
     m_cocoaNSWindow = cocoaNSWindow;
     // NOTE: We are no longer using posing so we won't get events on the
     // window's view unless it was explicitly created as the wx view class.