instance creatiion as an "event"

Greg Ewing (using news.cis.dfn.de) ckea25d02 at sneakemail.com
Tue Apr 15 20:05:42 EDT 2003


Alex Martelli wrote:
> If Member.members is coded
> as above, then you have circular reference loops involving the
> class and each instance so just about everything becomes sort of
> "immortal" -- with weak references in Member.members, no circular
> reference loops, no problems (or, am I missing something...?).

Circular references aren't a disaster these days, with
the cyclic garbage collector.

But if you want to be sure things are reclaimed as
soon as possible, weak refs are still a good idea.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list