About 65,100 results
Open links in new tab
  1. optimization - Python garbage collection - Stack Overflow

    Jun 23, 2009 · Python will automatically collect objects with circular references, unless any of the objects in a reference cycle have del methods. If that's the case, garbage objects are moved …

  2. How can I explicitly free memory in Python? - Stack Overflow

    838 According to Python Official Documentation, you can explicitly invoke the Garbage Collector to release unreferenced memory with gc.collect(). Example:

  3. Why should you manually run a garbage collection in python?

    Dec 8, 2015 · Garbage collection will only be involved if you have cyclic references. CPython will collect "islands" of objects that are not referenced anymore on a regular basis. You rarely …

  4. When are objects garbage collected in python? - Stack Overflow

    Feb 26, 2012 · When are objects garbage collected in python? When is the memory released and does the collection impact performance? Can one opt out or tune the gc algorithm and if so how?

  5. garbage collection - How does the `del` statement work in Python ...

    Feb 19, 2013 · Suppose I have a variable x and then try del x. Does this free the allocated memory immediately, or will it still wait for the garbage collector to collect the object at some …

  6. Manual garbage collection in Python - Stack Overflow

    Oct 29, 2009 · Is there any way to manually remove an object which the garbage collection refuses to get rid of even when I call gc.collect()? Working in Python 3.0

  7. Why Java and Python garbage collection methods are different?

    Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed. But, in Java, the GC(garbage collector) destroys objects …

  8. How do I release memory used by a pandas dataframe?

    Aug 23, 2016 · Whether or not memory reclaimed by the garbage collector is actually given back to the OS is implementation dependent; the only guarantee the garbage collector makes is …

  9. Garbage collection for a simple python class - Stack Overflow

    The second way is through garbage collection (gc). [Reference counting is a type of garbage collection, but python specifically calls this second method "garbage collection" -- so we'll also …

  10. garbage collection - Why does python use both reference …

    Jan 30, 2012 · 26 Python (the language) doesn't say which form of garbage collection it uses. The main implementation (often known as CPython) acts as you describe. Other versions such as …