• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
releasing NSKeyedUnarchiver causes crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: releasing NSKeyedUnarchiver causes crash
      • From: Markus Spoettl <email@hidden>
References: 
 >releasing NSKeyedUnarchiver causes crash (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Cocoa et al as HCI usability problem
  • Next by Date: Re: Cocoa et al as HCI usability problem
  • Previous by thread: releasing NSKeyedUnarchiver causes crash
  • Next by thread: Re: releasing NSKeyedUnarchiver causes crash
  • Index(es):
    • Date
    • Thread