Message306345
indent=True just makes json to use Python implementation instead of C implementation. Python implementation uses closures which reference one other. Simple example not involving json is:
import gc
def f():
def g():
return h
def h():
return g
return
gc.set_debug(gc.DEBUG_LEAK)
while True:
f()
gc.collect()
print(f"garbage count: {len(gc.garbage)}")
The "leak" is caused by using gc.set_debug(gc.DEBUG_LEAK). gc.DEBUG_LEAK includes gc.DEBUG_COLLECTABLE, gc.DEBUG_UNCOLLECTABLE and gc.DEBUG_SAVEALL. gc.DEBUG_SAVEALL causes garbage-collected objects to be saved in gc.garbage for inspection. In normal circumstances they are collected. |
|
Date |
User |
Action |
Args |
2017-11-16 09:01:32 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, rohandsa |
2017-11-16 09:01:32 | serhiy.storchaka | set | messageid: <1510822892.3.0.213398074469.issue32045@psf.upfronthosting.co.za> |
2017-11-16 09:01:32 | serhiy.storchaka | link | issue32045 messages |
2017-11-16 09:01:31 | serhiy.storchaka | create | |
|