NSTableView and memory management problem.
NSTableView and memory management problem.
- Subject: NSTableView and memory management problem.
- From: marko68 GMX <email@hidden>
- Date: Mon, 28 Mar 2005 00:18:58 +0200
Hello,
Seems I need an expert advice on memory management issue. I wrote a
Data Viewer, able to display some data of auxiliary structure. And
everything works fine until I load really huge datasets. The used
scheme is trivial - I have the main array, keeping additional arrays
(rows), allocating for every row its personal array, containing NCell
objects, initialized with data during the reading stage. But what
happens when I try to operate with huge data? Let's say a table,
having 2020 variables and 1975 rows. When such a table is loaded, the
Data Viewer consumes about 200 MB of the memory. When user closes the
Data Viewer window (but not the application itself, the application
has some additional forms to be displayed), I clean up the mentioned
arrays (retainCount of all object is 0, they are really ready to be
destroyed) and expect to see that all used memory is returned to the
OS (I use Activity Monitor to check it). But it does not happen. I
tried to use NSAutoreleasePool but it did not help. I load a new table
and additional memory is allocated my application. It is interesting
that if I load the same dataset several times, the Data Viewer does
not require additional memory.
So, my question is how to return the memory which is not needed
anymore to the OS immediately? This question is important, because in
a very short time all available memory is in use and this fact
prevents the computer from normal work. I use the same approach on
Windows - it worked good there.
Has anyone had any experience with the similar problem?
Dmitry Basko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden