Fixing memory errors

The CGColorRef was retained once too often while the UIImage was overreleased.
This commit is contained in:
Stefan Csomor
2017-06-24 11:17:05 +02:00
parent a77066d530
commit fb5239d709
2 changed files with 2 additions and 4 deletions

View File

@@ -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)

View File

@@ -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)