Re: clear all problem.
Re: clear all problem.
- Subject: Re: clear all problem.
- From: Chris Hanson <email@hidden>
- Date: Sun, 25 Nov 2007 23:19:29 -0800
On Nov 25, 2007, at 10:28 PM, Erfan Aleemullah wrote:
for instance, if the code was using 120mb real memory (seen via top
command
in terminal), then releasing and reallocating does not cause the
program to
occupy any less memory.
What column in the top report were you observing? "120mb real memory"
doesn't say whether you were paying attention to RSIZE, RPRVT, etc.
I dont expect it to occupy as much memory when its
first started, but i don't know why the memory requirements don't go
down at
all.
That depends entirely on what you mean by "memory requirements."
Address space, once granted to an application, is very rarely handed
back to the operating system. Thus if you look at the wrong values,
you may perceive your "memory requirements" to not go down even though
the amount of memory in actual use may be reduced. It's critical to
know exactly what you're measuring and how you're measuring it.
This is causing a problem in the long term stability of my app and
i'm not
sure what i can do to fix it.
any help will be appreciated.
*eg code:*
clear:(id)sender
{
[array release] //stores logs that the logger displays in its
GUI
....
array = [[NSMutableArray alloc]init]; //a new array that will
store
logs
.....
}
Is "array" a property of your controller that a table view is bound
to? If so, see my recent response in the "NSArrayController
frustration" thread for why the above is not something you want to do.
-- Chris
_______________________________________________
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