On Tuesday 03 October 2006 20:10, Oleg Broytmann wrote: > On Tue, Oct 03, 2006 at 07:10:09PM +0300, Dan Pascu wrote: > > So it seems that for objects that are obtained from classes derived > > from object (strings, dictionaries, Obj(object), ...) it won't reuse > > the addresses, but for objects that result from old style (pre 2.2) > > classes it seems it will. > > I think this is caused by the different handling of new and > old-style classes by the garbage collector. Instances of the old-style > classes are freed immediately, instances of the new style classes are > left dormant until gc collects them. > Or may be the existence of __del__ changes the handling. With > __del__ instances are freed immediately, without it are left for later > collecting.
I had a __del__ in the Obj(object) class but still the id was different for the new object, even though I've seen the __del__ being called, so the object was actually deleted. > > Oleg. -- Dan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss