• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: imageRepWithData memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Textfield
  • Next by Date: Re: SplashScreen
  • Previous by thread: imageRepWithData memory management
  • Next by thread: SplashScreen
  • Index(es):
    • Date
    • Thread