Skip to content

Add stdlib gc #247

Description

@python-processing-unit

Overview

Add new stdlib garbage collection module gc.

Public API

  • bool gc.track_new_symbols: Whether the GC tracks new symbols. Default true.
  • func bool gc.track_all(): Cause the GC to track all existing symbols. Returns whether any additional symbols were tracked.
  • func bool gc.track(str symbol): Cause the GC to track a symbol. Errors if symbol does not exist.
  • func bool gc.ignore_all(): Cause the GC to stop tracking all existing symbols. Returns whether any additional symbols were untracked.
  • func bool gc.ignore(str symbol): Cause the GC to stop tracking symbol. Errors if symbol does not exist.
  • func bool gc.collect(): Cause the GC to delete all unneeded tracked symbols. Returns whether any symbols were deleted.

Scope

Update (in order): the docs, tests, and implementation.

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestinterpreterRequires a code change in the interpreter.minorRequires a minor version change.testSomething related to the test suite.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions