]> git.saurik.com Git - wxWidgets.git/commitdiff
adapting ownership semantics to cocoa convention
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 9 Jun 2011 01:08:43 +0000 (01:08 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 9 Jun 2011 01:08:43 +0000 (01:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/button.mm

index 09f1f192dd223a8bfc05a93b08e628bcc9961684..35221346e1e4c81a2eb10eaf72a265e552ab05a7 100644 (file)
@@ -379,7 +379,7 @@ wxCFRef<NSImage*> downArray ;
     static wxBitmap trianglebm(disc_triangle_xpm);
     if ( downArray.get() == NULL )
     {
     static wxBitmap trianglebm(disc_triangle_xpm);
     if ( downArray.get() == NULL )
     {
-        downArray.reset( [wxDisclosureNSButton rotateImage:trianglebm.GetNSImage()] );
+        downArray.reset( [[wxDisclosureNSButton rotateImage:trianglebm.GetNSImage()] retain] );
     }
 
     if ( isOpen )
     }
 
     if ( isOpen )
@@ -407,7 +407,7 @@ wxCFRef<NSImage*> downArray ;
         fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
 
     [newImage unlockFocus];
         fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
 
     [newImage unlockFocus];
-    return newImage;
+    return [newImage autorelease];
 }
 
 @end
 }
 
 @end