diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index eec9ab241c..57996e27f9 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -167,9 +167,7 @@ WXWindow wxOSXGetKeyWindow() WX_UIImage wxOSXGetUIImageFromCGImage( CGImageRef image ) { - UIImage *newImage = [UIImage imageWithCGImage:image]; - [newImage autorelease]; - return( newImage ); + return [UIImage imageWithCGImage:image]; } wxBitmap wxOSXCreateSystemBitmap(const wxString& name, const wxString &client, const wxSize& size) diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index 614080dc62..e6e208b318 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -476,7 +476,7 @@ void wxWidgetImpl::Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to void wxWidgetIPhoneImpl::SetBackgroundColour( const wxColour &col ) { - m_osxView.backgroundColor = [[UIColor alloc] initWithCGColor:col.GetCGColor()]; + m_osxView.backgroundColor = [UIColor colorWithCGColor:col.GetCGColor()]; } bool wxWidgetIPhoneImpl::SetBackgroundStyle(wxBackgroundStyle style)