Memory management problem
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