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

gc.disable

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


Import

import gc
from gc import disable

Signature & Overview

gc.disable()

Disable automatic garbage collection.

Usage

import gc

gc.disable()
try:
    assert gc.isenabled() is False
finally:
    gc.enable()

Gotchas

REPL Inspect

from gc import disable
help(disable)

Linked from

Related notes