Memory Management in Python — The Basics
PyCon US 2016 · Portland, OR · 2016
Memory Management Python Internals Performance
Understanding memory management in Python can feel daunting — especially for developers without a computer science background. The documentation often assumes prior knowledge that beginners don’t have yet. This talk cuts through the jargon and gives a clear, accessible overview of how Python handles memory.
Topics covered:
- Reference counting — Python’s primary mechanism for tracking when objects can be freed
- Garbage collection — how Python handles circular references that reference counting can’t catch
- Weak references — holding a reference to an object without keeping it alive
__slots__— how to reduce memory usage for classes with many instances- The Global Interpreter Lock (GIL) — what it is, why it exists, and what it means for threading
This talk was ranked the #4 most-watched PyCon talk on RealPython.com.
Also Presented At
- North Bay Python 2018 — Watch on YouTube