• 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
Copy of NSDictionary is cleared when the original is cleared. Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Copy of NSDictionary is cleared when the original is cleared. Why?


  • Subject: Copy of NSDictionary is cleared when the original is cleared. Why?
  • From: email@hidden
  • Date: Thu, 12 Mar 2009 08:58:59 -0700 (PDT)

Why is myDict empty?
{I've checked via debugger po}
It's a COPY of textDictionary, that had been cleared.

Here's my code:


+ (NSDictionary *)getTextData {
    NSDictionary *myDict = [textDictionary copy];
    [self resetDataCache];
    return myDict;
} // end getText().

+ (void)resetDataCache {
    [textDictionary removeAllObjects];
 ...
 // end resetDataCache().


-- Regards,
Ric.
_______________________________________________

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

  • Prev by Date: Re: NSGradient draws incorrectly in PDF context?
  • Next by Date: Bi-directional pipe with AuthorizationExecuteWithPrivileges
  • Previous by thread: Re: GC Seems To Never Kick In
  • Next by thread: Bi-directional pipe with AuthorizationExecuteWithPrivileges
  • Index(es):
    • Date
    • Thread