On this page
  1. gc.freeze
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

gc.freeze

Prev: gc.enable | Up: gc | Next: gc.get_count
Rel: gc.collect, gc.disable, gc.enable, gc.get_count
Ref: docs.python.org — gc.freeze
Tags: #public #python3 #stdlib #gc


Import

import gc
from gc import freeze

Signature & Overview

gc.freeze()

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

Usage

import gc

# Moves all currently tracked objects to a permanent generation (ignored by future GC runs)
assert callable(gc.freeze)

Gotchas

REPL Inspect

from gc import freeze
help(freeze)

Linked from

Related notes