• 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: Handle data disappearing out from underneath me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handle data disappearing out from underneath me


  • Subject: Re: Handle data disappearing out from underneath me
  • From: Andrew Farmer <email@hidden>
  • Date: Sun, 8 Apr 2007 13:23:34 -0700

On 08 Apr 07, at 07:24, Ken Tozier wrote:
Being an autoreleased NSData probably has something to do with it but I would have thought that PtrToHand did something internally to prevent the deletion of the data it points to...

Nope. I'm pretty sure that, as part of the old Memory Manager, PtrToHand doesn't do anything to retain data passed to it - it assumes that the underlying data was allocated with NewPointer or something similar. If the data was actually created as an NSData instance and hasn't been retained, it will get deallocated and (eventually) overwritten!
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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


References: 
 >Handle data disappearing out from underneath me (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: How to make NSWindow redraw vacated rects "ifNeeded"?
  • Next by Date: Points
  • Previous by thread: Re: Handle data disappearing out from underneath me [Solved]
  • Next by thread: How to make NSWindow redraw vacated rects "ifNeeded"?
  • Index(es):
    • Date
    • Thread