Language Features

PyGc

Python stdlib module — gc. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.collect()Neutral
#
Signature
collect(generation)

Run the garbage collector.

.disable()Neutral
#
Signature
disable()

Disable automatic garbage collection.

.enable()Neutral
#
Signature
enable()

Enable automatic garbage collection.

.freeze()Neutral
#
Signature
freeze()

Freeze all current tracked objects and ignore them for future collections.

.get_count()Neutral
#
Signature
get_count()

Return a three-tuple of the current collection counts.

.get_debug()Neutral
#
Signature
get_debug()

Get the garbage collection debugging flags.

.get_freeze_count()Neutral
#
Signature
get_freeze_count()

Return the number of objects in the permanent generation.

.get_objects()Neutral
#
Signature
get_objects(generation)

Return a list of objects tracked by the collector (excluding the list returned).

.get_referents()Neutral
#
Signature
get_referents()

get_referents(*objs) -> list

.get_referrers()Neutral
#
Signature
get_referrers()

get_referrers(*objs) -> list

Fully-Qualified Names

FQNField
gcfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import gc