Hi Randy,

First, its not a good idea to use invalidateAllObjects() to free memory;  call saveChanges more frequently or just fetch what you need.  

System.gc() is good for debugging but  will not help you to solve your problem.

If you really  need more memory you can adjust the maximum memory size of your java application : -Xms64m -Xmx300m (the default is -Xms64m -Xmx96m I think);  don't allow more than 70% of your system memory (java doesn't like virtual memory).


Jacky



On 06-03-07, at 17:10, Randy Wigginton wrote:

Hello,

My program loads a great deal of data from the database.  I process it, then attempt to “free” the memory.  My code looks vaguely like this:

For (all objects) {

EOEditingContext tmp = new EOEditingContext();

<load objects from tmp with a fetch specification>

 

tmp.invalidateAllObjects();

tmp = null;

System.gc();

}

 

Even with this, I’m running out of memory.  Any hints on making EO throw away everything it knows about?

 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to