On this page
gc.get_count
Prev: gc.freeze | Up: gc | Next: gc.get_debug
Rel: gc.collect, gc.disable, gc.enable, gc.freeze
Ref: docs.python.org — gc.get_count
Tags: #public #python3 #stdlib #gc
Import
import gc
from gc import get_count
Signature & Overview
gc.get_count()
Return a three-tuple of the current collection counts.
Usage
import gc
g0, g1, g2 = gc.get_count()
assert all(isinstance(x, int) for x in (g0, g1, g2))
Gotchas
- Returns current collection counters for generations
(0, 1, 2).
REPL Inspect
from gc import get_count
help(get_count)
Linked from
Related notes
- tuts/python3/stdlib_module/gc/collect Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/disable Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/enable Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/freeze Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_debug Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/gc/get_freeze_count shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_objects shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_referents shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_referrers shared tags: #gc, #stdlib