Garbage Collection Method

  • Thread starter JAVIER ALBERTO MONTOYA TORRES
  • Start date
J

JAVIER ALBERTO MONTOYA TORRES

Someone else know whats the way Python collect Garbage, by
unreferenced locations in memory, usings flags, maybe hybrid of two or
more methods, ... Can help me?

Javier Montoya
 
T

Terry Reedy

JAVIER ALBERTO MONTOYA TORRES said:
Someone else know whats the way Python collect Garbage, by
unreferenced locations in memory, usings flags, maybe hybrid of two or
more methods, ... Can help me?

Python, the language, only specifies that the interpreter *may* collect
unneeded items. CPython uses reference counting backed by a
'generational'? gc for isolated cycles. Jython uses the Jave gc system,
whatever that is.

tjr
 
J

Josiah Carlson

Someone else know whats the way Python collect Garbage, by
unreferenced locations in memory, usings flags, maybe hybrid of two or
more methods, ... Can help me?

It uses a reference counting method, along with a cycle-detection
algorithm. More information about the cyclic garbage collector can be
found in the documentation for the gc module in the standard library.

- Josiah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,183
Messages
2,570,966
Members
47,516
Latest member
ChrisHibbs

Latest Threads

Top