Re: Memory Management
Re: Memory Management
- Subject: Re: Memory Management
- From: Chuck Hill <email@hidden>
- Date: Tue, 24 Feb 2009 10:22:24 -0800
On Feb 23, 2009, at 9:13 PM, Jeff Schmitz wrote:
Hello,
In my app I frequently need to run operations that read in
nearly all the data in my database. One I run in the foreground (I
have concurrent request handling on), and another I run in the
background with its own EOObjectStoreCoordinator. If I understand
how things work (and there's no guarantee of that), that would mean
I basically have 4 copies of my database in memory at once (2 ECs
and to object stores).
No. :-) Two copies. The objects in the EC don't copy the data, they
only have references to the data in the object store. If you change
an EO, only the changed values are stored in the EC, and only until it
is saved.
As I use the data in a serial fashion, I was wondering if there's a
way to release the EOs that are held in memory in both the EC and
the Object Store once I know my each process is through with them,
especially for the threaded process that has its own object store?
Is just using ec.reset() at key points the way to go for the ec's?
What about for the object stores?
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Memory+Management
Your best bet (IMO) is to unlock and dispose of the EC and then create
a new one and carry on. Look after the editing contexts, and the
object stores will take care of themselves.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden