Re: imageRepWithData memory management
Re: imageRepWithData memory management
- Subject: Re: imageRepWithData memory management
- From: Wdyp <email@hidden>
- Date: Sun, 2 Dec 2007 16:16:06 +0100
NSBitmapImageRep *image = [NSBitmapImageRep imageRepWithData:
[myNSImage TIFFRepresentation]];
According to documentation:
Creates and returns an NSBitmapImageRep object initialized with the
first image in the supplied data.
But my question is what about release? Or is the object from
imageRepWithData autorelease?
Further what is happening to the NSData object that is createdby
TIFFRepresentation, is it autoreleas?
Hello,
As long as you don’t send the alloc, copy, retain or new messages,
you should not have to bother with memory management,
especially with class (or "convenience") methods
--those beginning with a "+"-- like imageRepWithData: .
Have a look:
file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html
Flofl._______________________________________________
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