releasing NSKeyedUnarchiver causes crash
releasing NSKeyedUnarchiver causes crash
- Subject: releasing NSKeyedUnarchiver causes crash
- From: Klaus Backert <email@hidden>
- Date: Sun, 18 May 2008 14:25:44 +0200
Am 18.05.2008 um 09:51 schrieb Markus Spoettl:
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName
error:(NSError **)outError
{
*outError = nil;
NSKeyedUnarchiver *archiver;
archiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:
data];
// release current data
[tracks release];
tracks = [archiver decodeObjectForKey: @"myobject"];
[tracks retain];
may be because this is missing:
[archiver finishDecoding];
[archiver release]; // <--- crash here, no crash if commented out
return YES;
}
Greetings
Klaus
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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