Re: [Q] Why unsolicited dealloc in NSKeyedUnarchiver?
Re: [Q] Why unsolicited dealloc in NSKeyedUnarchiver?
- Subject: Re: [Q] Why unsolicited dealloc in NSKeyedUnarchiver?
- From: "Louis C. Sacha" <email@hidden>
- Date: Mon, 19 Apr 2004 22:57:11 -0700
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 unarchiveObjectWith
Data:data] retain];
Hope that helps,
Louis
In trying to add Open Recent support to MyDocument app everything is
working fine with the exception of an unsolicited call to dealloc by
NSKeyedUnarchiver. Any ideas where this is coming from and moreover
why? I'm confused. TIA for your help... Peter
From MyDocument
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType {
passwordRecords = [NSKeyedUnarchiver unarchiveObjectWithData:data];
return YES;
...
_______________________________________________
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.