• 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: Question about dealloc and NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about dealloc and NSBitmapImageRep


  • Subject: Re: Question about dealloc and NSBitmapImageRep
  • From: glenn andreas <email@hidden>
  • Date: Mon, 10 Jul 2006 20:49:12 -0500


On Jul 10, 2006, at 8:23 PM, Juan P. Pertierra wrote:

Hello,

When dealloc gets called for an NSBitmapRep object, does the data pointed to by the 'planes' array of pointers
also get freed? My understanding is that it does not get freed, only the NSBitmapImageRep object itself, but
I'm running into a crash that makes me question this...


Thanks in advance,

Let's see what the documentation says:

If planes is NULL or an array of NULL pointers, this method allocates enough memory to hold the image described by the other arguments. You can then obtain pointers to this memory (with the getPixel:atX:y: or bitmapData method) and fill in the image data. In this case, the allocated memory will belong to the object and will be freed when it’s freed.

If planes is not NULL and the array contains at least one data pointer, the object will only reference the image data; it won’t copy it. The buffers won’t be freed when the object is freed.


Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Question about dealloc and NSBitmapImageRep (From: "Juan P. Pertierra" <email@hidden>)

  • Prev by Date: Re: Determining modifier key state and *end* of menu selection
  • Next by Date: Motion Sensor
  • Previous by thread: Question about dealloc and NSBitmapImageRep
  • Next by thread: Motion Sensor
  • Index(es):
    • Date
    • Thread