Answer Posted / chaitanya
Memory management in Python involves a private heap containing all Python objects and data structures. Interpreter takes care of Python heap and that the programmer has no access to it.
The allocation of heap space for Python objects is done by Python memory manager. The core API of Python provides some tools for the programmer to code reliable and more robust program.
Python also has a build-in garbage collector which recycles all the unused memory. When an object is no longer referenced by the program, the heap space it occupies can be freed. The garbage collector determines objects which are no longer referenced by the sprogram frees the occupied memory and make it available to the heap space.
The gc module defines functions to enable /disable garbage collector:
gc.enable() -Enables automatic garbage collection.
gc.disable() - Disables automatic garbage collection.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is map () in python?
What is purpose of __init__ in class ? Is it necessary to use __init__ while creating a class ?
Is tensorflow written in python?
Is null in python?
What is oops in python?
Which server is best for python?
How will you capitalize the first letter of string?
Describe about the libraries of python?
Is nodejs faster than python?
What is sys stdout flush ()?
Do while loops python?
How to tic tac toe computer move?
What does time sleep do in python?
Is python object oriented?
What is repl in python?