0 votes
in Python by
Whenever Python exits, all the memory isn’t deallocated. Why is it so?

1 Answer

0 votes
by

Upon exiting, Python’s built-in effective cleanup mechanism comes into play and try to deallocate or destroy every other object.

However, Python modules that are having circular references to other objects or the objects that are referenced from the global namespaces aren’t always deallocated or destroyed.

This is because it is not possible to deallocate those portions of the memory that are reserved by the C library.

Related questions

0 votes
asked Aug 29, 2020 in Python by Robindeniel
0 votes
asked Dec 19, 2019 in Python by sharadyadav1986
...