-
Notifications
You must be signed in to change notification settings - Fork 1
Add stdlib gc #247
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestinterpreterRequires a code change in the interpreter.Requires a code change in the interpreter.minorRequires a minor version change.Requires a minor version change.testSomething related to the test suite.Something related to the test suite.
Milestone
Description
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestinterpreterRequires a code change in the interpreter.Requires a code change in the interpreter.minorRequires a minor version change.Requires a minor version change.testSomething related to the test suite.Something related to the test suite.
Overview
Add new stdlib garbage collection module
gc.Public API
bool gc.track_new_symbols: Whether the GC tracks new symbols. Defaulttrue.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 asymbol. Errors ifsymboldoes 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 trackingsymbol. Errors ifsymboldoes 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.