Re: how to "free" an object/var ?




"John Nagle" <nagle@xxxxxxxxxxx> wrote in message
news:AAXvh.1465$zH1.1114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| If your data structure has no backlinks, it will go away
| as soon as the last reference to it disappears.
| In Python, garbage collection is mostly a backup to
| the reference counting system.

These both are true of the CPython implementation (current and known
future, at least) but not of other implementations and not of the language
itself.

The same comment applies to some other posts in this thread. GC, if any,
is implementation defined.

tjr



.



Relevant Pages

  • Re: Question about turning off garbage collection
    ... turn off garbage collection while the critical code of the thread is ... Now, I don't know much about how the garbage collector works in python, ... Reference counting alone is not ... strong enough to detect trash objects in cycles (like A points to B ...
    (comp.lang.python)
  • Re: Tracking down memory leaks?
    ... I *think* Python uses reference counting for garbage collection. ... with this algorithm is that if you create a circular reference the ...
    (comp.lang.python)
  • Re: Is my thread safe from premature garbage collection?
    ... > I'm aware that in Python an object is cleared for garbage collection as ... > soon as the last reference to it disappears. ... > are safe from unwanted garbage collection, ...
    (comp.lang.python)
  • Is my thread safe from premature garbage collection?
    ... I'm aware that in Python an object is cleared for garbage collection as ... soon as the last reference to it disappears. ...
    (comp.lang.python)
  • Re: Memory leak in Tkinter?????
    ... See Language Reference 3.1 for more details. ... Python isn't Java and DOES NOT HAVE lazy garbage collection (but you ... I repeated the test in windows and I do not see "delayd release". ...
    (comp.lang.python)