ownership problem?

Fredrik Lundh fredrik at pythonware.com
Mon Nov 21 08:50:40 EST 2005


Jeffrey Schwab wrote:

> >>>the problem isn't determining who owns it, the problem is determining
> >>>who's supposed to release it.  that's not a very common problem in a
> >>>garbage-collected language...
> >>
> >>Yes it is.  Memory is only one type of resource.
> >
> > Python's garbage collector deals with objects, not memory.
>
> But you don't want to spin and wait for the garbage collector to release
> the object that happens to be holding a thread lock...

no, but arguing that sockets and thread locks are objects that suffer
from ownership problems is rather silly.  if their use isn't localized to a
single function or a single manager object, your design is flawed.

</F>






More information about the Python-list mailing list