Re: Unarchiver problems!
Re: Unarchiver problems!
- Subject: Re: Unarchiver problems!
- From: glenn andreas <email@hidden>
- Date: Fri, 25 Mar 2005 23:41:30 -0600
On Mar 25, 2005, at 11:29 PM, Tom Birch wrote:
This is following on from my "Bindings problems" thread, I have
reduced the problem down to something with NSUnarchiver, or,
something. Here is a gdb trace that should give you a fair idea of
what is going on:
http://tbir905.web.cse.unsw.edu.au/gdbsession.txt
38 - (id)initWithCoder:(NSCoder *)coder
39 {
40 if(self = [super init])
41 {
42 dict = [coder decodeObject];
43 }
44 return self;
Line 42 should be dict = [[coder decodeObject] retain];
since otherwise the value returned from decodeObject is autoreleased so
it will go away "real soon" (and obviously you want to keep it around,
instead of having it replaced with random flotsam).
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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