On May 18, 2008, at 5:25 AM, Klaus Backert wrote:
- (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];


That wasn't it but thanks for helping.

The real reason was that I forgot to retain the objects decoded in tracks:initWithCoder: after decoding, so instead of

  timeStamp = [[decoder decodeObjectForKey:@"timeStamp"] retain];

I had

  timeStamp = [decoder decodeObjectForKey:@"timeStamp"];

and apparently the NSKeyedUnarchiver was the only think keeping that data alive.

Well, I apologize for wasting your time.

Regards
Markus
--
__________________________________________
Markus Spoettl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to