From: SourceForge.net <no...@so...> - 2005-08-15 18:10:42
|
Bugs item #1256271, was opened at 2005-08-10 16:45 Message generated for change (Comment added) made by kingb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=505345&aid=1256271&group_id=63836 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Output: CreateDBAPI Group: v0.2 >Status: Closed >Resolution: Fixed Priority: 9 Submitted By: Brandon King (kingb) Assigned to: Brandon King (kingb) Summary: DBAPI Append/Set Object Bug (In-memory & DB related) Initial Comment: If you have two DBAPI objects, such as A and B. If you call A.appendB(B) and then try calling B.getA(), it will fail because the append and set functions don't go to the other object and add them selves to the other object. ---------------------------------------------------------------------- >Comment By: Brandon King (kingb) Date: 2005-08-15 11:10 Message: Logged In: YES user_id=552216 Fixes for bugs 1256258 and 1256271. Memory leak should now be fixed. Ten test cases have be implemented in tests/TestMemLeak.py... All ten pass currently. I tested for slow down in creating and commiting 10,000 objects to a database. It has a 0.2 sec slow down in a 94 sec time frame. The fix includes an object cache which reuses objects which have already been pulled into memory (using weakrefs). Also, there is a new function for DBClass objects called _destroySelf. This function must be called before calling del on an DBClass object. This is only useful when you want to free up some memory when your done with a DBClass object, but the program is going to continue to run. It works by removing all references to the class your trying to remove so that the python ref count will be low enough for garbage collection to free up the memory. Calling del without calling _destroySelf will NOT remove the object from memory. To go back to the memory leaky version check out tag 'pre_aug_2005_mem_patch'. ---------------------------------------------------------------------- Comment By: Brandon King (kingb) Date: 2005-08-10 17:58 Message: Logged In: YES user_id=552216 Dang... as it turns out, this bug applies to objects retrieve from the db, with the only difference that if you call A.getB() and then B.getA(), B is actually returning you a second copy of A from the DB and not giving you the first loaded A. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=505345&aid=1256271&group_id=63836 |