• 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
Re: NSMutableDictionary crash on PPC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableDictionary crash on PPC


  • Subject: Re: NSMutableDictionary crash on PPC
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 29 Sep 2010 08:02:12 +0000
  • Thread-topic: NSMutableDictionary crash on PPC

> Did you read my post about retaining things before you remove them from
> dictionaries?
>


> myDict = [myObject objectForKey:myOldKey];
> if (myDict)
> {
>    [myObject removeObjectForKey: myOldKey];
>    [myObject setValue:myDict forKey:myNewKey];
>
>    [[NSUserDefaults standardUserDefaults] synchronize];
> }


I don't have a PPC here, but I assume that must be it. Odd though that it
doesn't wait until the autorelease pool is flushed.

There is example code here (2nd example) that removes before setting too.

http://stackoverflow.com/questions/1024938/renaming-keys-in-nsmutablediction
ary

T.


_______________________________________________

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: NSMutableDictionary crash on PPC
      • From: Roland King <email@hidden>
References: 
 >Re: NSMutableDictionary crash on PPC (From: Roland King <email@hidden>)

  • Prev by Date: Re: NSMutableDictionary crash on PPC
  • Next by Date: Re: NSMutableDictionary crash on PPC
  • Previous by thread: Re: NSMutableDictionary crash on PPC
  • Next by thread: Re: NSMutableDictionary crash on PPC
  • Index(es):
    • Date
    • Thread