MCPcopy Index your code
hub / github.com/RustPython/RustPython / collect

Method collect

crates/vm/src/gc_state.rs:375–377  ·  view source on GitHub ↗

Perform garbage collection on the given generation

(&self, generation: usize)

Source from the content-addressed store, hash-verified

373
374 /// Perform garbage collection on the given generation
375 pub fn collect(&self, generation: usize) -> CollectResult {
376 self.collect_inner(generation, false)
377 }
378
379 /// Force collection even if GC is disabled (for manual gc.collect() calls)
380 pub fn collect_force(&self, generation: usize) -> CollectResult {

Callers 15

criterion_benchmarkFunction · 0.80
test_listMethod · 0.80
test_dictMethod · 0.80
test_tupleMethod · 0.80
test_classMethod · 0.80
test_newstyleclassMethod · 0.80
test_instanceMethod · 0.80
test_newinstanceMethod · 0.80
test_methodMethod · 0.80
test_legacy_finalizerMethod · 0.80
test_functionMethod · 0.80

Calls 1

collect_innerMethod · 0.80

Tested by 15

test_listMethod · 0.64
test_dictMethod · 0.64
test_tupleMethod · 0.64
test_classMethod · 0.64
test_newstyleclassMethod · 0.64
test_instanceMethod · 0.64
test_newinstanceMethod · 0.64
test_methodMethod · 0.64
test_legacy_finalizerMethod · 0.64
test_functionMethod · 0.64
test_frameMethod · 0.64