Re: Adding Images to a Cocoa Application in XCode
Re: Adding Images to a Cocoa Application in XCode
- Subject: Re: Adding Images to a Cocoa Application in XCode
- From: Michael Watson <email@hidden>
- Date: Sun, 1 Jul 2007 15:25:24 -0400
This leaks. You need to release the image when you're done with it.
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
MemoryMgmt.html
--
m-s
On 01 Jul, 2007, at 15:05, David Arnold wrote:
NSString *file = @"/Users/darnold/tmp/cocoa/practice/
blue_flower.jpg";
NSImage *image = [[NSImage alloc] initWithContentsOfFile:file];
[image drawInRect: destRect
fromRect:NSZeroRect
operation:NSCompositeSourceOver
fraction:1.0];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden