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 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