• 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
Memory management problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory management problem


  • Subject: Memory management problem
  • From: Development <email@hidden>
  • Date: Wed, 6 Feb 2008 09:50:42 -0700

I have a program that works with around 50k to 100k 23byte pieces of data. It needs to loop through the data to sort it out, and this seems to require and unbelievable amount of memory. Basically in the loop: I have a global mutable dictionary, through each iteration a smaller dictionary, containing the values of Name:23 - 50 bytes Size: Just an nsnumber Parent: The name of it's parent usually around 25 - 50bytes max. And of course this dictionary is added to the global mutable dictionary.

Now I realize that even though within the loop I am using a autorelease pool those temp dictionaries are being retained by the main one. However the application uses over 300megs of real memory and is not releasing any of it, even after the process is complete. I have tried releasing the global dictionary after the final sorting is complete since there shouldn't be anything retaining it, but this crashes the application. I have also detached this procedure from the main thread but when it is finished the memory is still not reclaimed.... Does any one have any suggestions on what I might be doing wrong?



_______________________________________________

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: Memory management problem
      • From: Benjamin Stiglitz <email@hidden>
    • Re: Memory management problem
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by Date: Re: Memory management problem
  • Previous by thread: Popping open a status item menu
  • Next by thread: Re: Memory management problem
  • Index(es):
    • Date
    • Thread