This module provides access to the garbage collector for reference
cycles.
enable() -- Enable automatic garbage collection. disable() -- Disable
automatic garbage collection. isenabled() -- Returns true if automatic
collection is enabled. collect() -- Do a full collection right now.
get_count() -- Return the current collection counts. set_debug() -- Set
debugging flags. get_debug() -- Get debugging flags. set_threshold() --
Set the collection thresholds. get_threshold() -- Return the current the
collection thresholds. get_objects() -- Return a list of all objects
tracked by the collector. get_referrers() -- Return the list of objects
that refer to an object. get_referents() -- Return the list of objects
that an object refers to.
n
|
collect(generation=...)
With no arguments, run a full collection. |
|
|
None
|
disable()
Disable automatic garbage collection. |
|
|
None
|
enable()
Enable automatic garbage collection. |
|
|
(count0, count1, count2)
|
get_count()
Return the current collection counts |
|
|
flags
|
get_debug()
Get the garbage collection debugging flags. |
|
|
[...]
|
get_objects()
Return a list of objects tracked by the collector (excluding the list
returned). |
|
|
list
|
get_referents(*objs)
Return the list of objects that are directly referred to by objs. |
|
|
list
|
get_referrers(*objs)
Return the list of objects that directly refer to any of objs. |
|
|
(threshold0, threshold1, threshold2)
|
get_threshold()
Return the current collection thresholds |
|
|
status
|
isenabled()
Returns true if automatic garbage collection is enabled. |
|
|
None
|
set_debug(flags)
Set the garbage collection debugging flags. |
|
|
|
set_threshold(...)
set_threshold(threshold0, [threshold1, threshold2]) -> None |
|
|