MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / output_memory

Function output_memory

gui/utils/gdi.py:13–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12last = None
13def output_memory():
14 global last
15 d = defaultdict(int)
16 for o in gc.get_objects():
17 name = type(o).__name__
18 if name == 'Bitmap':
19 del o
20 d[name] += 1
21
22 items = d.items()
23 items = sorted(items,key=lambda x:x[1])
24 print('------')
25 for key, value in items:
26 if last is not None:
27 if value -last[key] !=0:
28 print(f'{key} {value - last[key]}, {value}')
29 else:
30 print( key, value)
31
32 last = d

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected