Python Memory Understanding
summary
Explains what happens when a Python variable is created: every value is an object with a unique id and a reference count that increments for assignments and decrements on scope exit, local returns and deletions. Describes Python using reference counting plus a generational garbage collector to find and free unreachable cycles, why circular references survive simple refcounting, and shows practical consequences for lists, dicts and long‑running processes plus when collection actually runs.
AI-written summary · about
chapters (10)
- 0:00Introduction and welcome
- 1:14Python memory basics
- 3:04Garbage collection in Python
- 6:15Reference counting explained
- 9:34Circular references and cleanup
- 12:20Circular reference cycles
- 15:26Circular reference impact
- 17:12Reference management tips
- 20:39Practical reference handling
- 21:47Q&A and closing
related talks
25mIs it me or Python memory management? 🤔💻
25mTime to Take Out the Trash: garbage collector
27mVariables and objects in Python: it's pointers all the way down
27mDemystifying Python’s Generational Garbage Collector
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
40mKnowing your garbage collector
23mMemoirs of a Python Object: Memory Management and Improving Performance
