pocketpy/tests/71_gc.py
BLUELOVETH c45a5df1e8
add setup_gc_debug_callback (#406)
* [no ci] backup

* [no ci] backup

* [no ci] fix

* [no ci] fix

* [no ci] fix

* [no ci] fix

* [no ci] fix

* [no ci] fix

* [no ci] fix

* [no ci] fix

---------

Co-authored-by: 张皓晟 <2067144018@qq.com>
2025-11-23 16:30:22 +08:00

16 lines
252 B
Python

import gc
from pkpy import setup_gc_debug_callback
setup_gc_debug_callback(print)
gc.collect()
def create_garbage():
a = [(1,2) for i in range(20000)]
return a
create_garbage()
gc.collect()
create_garbage()
create_garbage()
create_garbage()