Re: [Q] Why unsolicited dealloc in NSKeyedUnarchiver?
Re: [Q] Why unsolicited dealloc in NSKeyedUnarchiver?
- Subject: Re: [Q] Why unsolicited dealloc in NSKeyedUnarchiver?
- From: Shawn Erickson <email@hidden>
- Date: Tue, 20 Apr 2004 12:53:37 -0700
What is going wrong? The stack trace doesn't explain that...
-Shawn
On Apr 20, 2004, at 11:44 AM, Peter.Teeson wrote:
Thanks for your comment. I tried your suggestion to no avail.
Furthermore it is indeed NSKeyedUnArchiver that is calling dealloc as
per the stack (see below).
I am quite willing to admit that I am not handling memory correctly.
However I still do not see where that is the case - probably because
of my newbie ignorance.
Please be patient with me....
respect....
Peter
From debugger
#0 0x020e8450 in -[PasswordRecord dealloc] at PasswordRecordsModel.m:88
#1 0x90197fe8 in CFDictionaryRemoveAllValues
#2 0x901a6088 in __CFDictionaryDeallocate
#3 0x90190db0 in CFRelease
#4 0x90a5545c in -[NSKeyedUnarchiver dealloc] <<<< unsolicited call
#5 0x90aacf3c in +[NSKeyedUnarchiver unarchiveObjectWithData:]
#6 0x02009348 in -[MyDocument loadDataRepresentation:ofType:] at
.........
On Apr 20, 2004, at 01:57, Louis C. Sacha wrote:
Hello...
Actually, I don't think it is a problem with NSKeyedUnarchiver at
all. You probably just need to retain the unarchived object in your
loadDataRepresentation:ofType: method... (and check to make sure you
release it in your document's dealloc method).
passwordRecords = [[NSKeyedUnarchiver unarchiveObjectWithData:data]
retain];
Hope that helps,
Louis
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.