]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/utilscocoa.mm
Fix hangups when using sockets under OS X.
[wxWidgets.git] / src / osx / carbon / utilscocoa.mm
index 25ec0b1e7eb8f8aceeb147ff9cdac820a3f0d2c0..1c2ec0dc70fc6a4c044e02b09f76afd19e20e7cc 100644 (file)
@@ -249,7 +249,7 @@ WX_UIFont wxFont::OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info)
         if ( traits & NSFontItalicTrait )
             fontstyle = wxFONTSTYLE_ITALIC ;
         */
-        wxCFStringRef fontname( [uifont familyName] );
+        wxCFStringRef fontname( wxCFRetain([uifont familyName]) );
         info->Init(size,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined,
             fontname.AsString(), wxFONTENCODING_DEFAULT);
         
@@ -270,6 +270,17 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info)
 // NSImage Utils
 // ----------------------------------------------------------------------------
 
+#if wxOSX_USE_IPHONE
+
+WX_UIImage  wxOSXCreateUIImageFromCGImage( CGImageRef image )
+{
+    UIImage  *newImage = [UIImage imageWithCGImage:image]; 
+    [newImage autorelease];
+    return( newImage );
+}
+
+#endif
+
 #if wxOSX_USE_COCOA
 
 //  From "Cocoa Drawing Guide:Working with Images"