• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Python by
Q:
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 Jun 1, 2021 in Bitcoin by rajeshsharma
0 votes
asked Jun 26, 2020 in Python by AdilsonLima
...