How is memory managed in python?
How garbage collection happens in Python?
What is reference counting? What is Generational garbage collection in Python?
All these are very famous Python interview questions that test the depth of knowledge in Python.
In this two part video, we are going to learn a lot about Python memory management.
Topics covered in this video:
1. What is memory management?
2. How variables behave in Python? Variable as memory references
3. What is reference counting?
4. Code examples of how to find reference count of an object
5. Drawbacks of reference counting? What is circular references?
Part 2: Coming within a week
Python Interview Questions series: • Python Interview Questions Series - Beginn...
Timestamps:
0:00 - Introduction
1:28 - What is Memory management and why it is needed
5:00 - How Python performs memory management
6:10 - Variables as memory references
8:01 - What is Reference counting
11:20 - Code examples on reference counting (Sys and ctypes module)
19:13 - Drawback of reference counting
19:54 - What is circular reference
21:52 - Outro