Fixing memory errors
The CGColorRef was retained once too often while the UIImage was overreleased.
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user