Hi,

Thanks to all who responded with ideas, in particular Michael Klybor and
Gordon Jones. After following up the leads, the fix involved the
following code (which is periodically called during the processing of
the file containing the data to be loaded - before first one and every X
records after that). It seems weird having autorelease pools in Java!

        if (!firstTime) 
        {
            EODatabaseContext temp;
            temp = EODatabaseContext.registeredDatabaseContextForModel(
EOModelGroup.defaultGroup().entityNamed("AnEntity").model(),
session().defaultEditingContext());
            temp.invalidateAllObjects();
            Runtime.getRuntime().gc();
            NSAutoreleasePool.pop(1);
            System.gc();
        }
        NSAutoreleasePool.push();

Once again, thanks.

-- 
Derek Rendall
Senior Software Engineer
Computer Science Applied Research Centre
a.k.a. Black Albatross
University of Otago
P.O. Box 56
Dunedin
New Zealand
ph +64 3 4799018
fax +64 3 4799033
http://www.blackalbatross.com

Reply via email to