'Print all in memory object references with count

Is it possible to get all object/variable references in current running application with count? I don't have objects/variable names.

I tried:

locals()
globals()
gc.get_objects()


Solution 1:[1]

The function sys.gettotalrefcount() is available if running the debug build of Python (python_d.exe). It's useful when writing Python C extensions to verify if a function is leaking references.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mark Tolonen