Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

The garbage collector in Python does not work like that. If an object reaches 
zero references is destroyed immediately. The only problem is when circular 
references exist and is in this case when object deletion is delayed until the 
garbage collector runs the algorithm to detect circular references and delete 
them. This time is longer depending on the generation in which the object is 
placed.

Although this is true, there might be a problem in the lines you explain 
because is not guaranteed to collect garbage containing circular references 
(see Data Model in the documentation). In this case is important as you state 
to have an interface to ensure releasing the resources.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33081>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to