Skip navigation.
 
mlRe: Handle data disappearing out from underneath me
FROM : Andrew Farmer
DATE : Sun Apr 08 22:23:34 2007

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!

Related mailsAuthorDate
mlHandle data disappearing out from underneath me Ken Tozier Apr 8, 16:24
mlRe: Handle data disappearing out from underneath me Ken Tozier Apr 8, 16:48
mlRe: Handle data disappearing out from underneath me glenn andreas Apr 8, 17:01
mlRe: Handle data disappearing out from underneath me [Solved] Ken Tozier Apr 8, 17:07
mlRe: Handle data disappearing out from underneath me Andrew Farmer Apr 8, 22:23