public Main(WOContext context) { super(context); // The memory leak doesn't happen unless there are multiple OSCs registered with // ERXObjectStoreCoordinatorSynchronizer._coordinators. Using an OSC (performing a lookup, etc, // as below) causes the OSC to be added to the _coordinators array. EOEditingContext ec = ERXEC.newEditingContext(_osc); ec.lock(); try { NSArray dcArray = EOUtilities.objectsForEntityNamed(ec, "DataContainer"); } finally { ec.unlock(); ec.dispose(); ec = null; } }
/** @TypeInfo Student */ public NSMutableArray getStudents() { return EOUtilities.objectsForEntityNamed(this.session().defaultEditingContext(), "Student") .mutableClone(); }