Memory Management in Python

Jatin Goel (~jatin15)




We'll be talking about how objects are stored in stored in memory and how they're garbage collected.

  1. Reference count
  2. Garbage collection
  3. Generational garbage collection
  4. Some gotchas
  5. And then finally, some quick optimizations you can do in your Python code

Talk breakdown:

  • Brief intro about Memory Management - 2 minutes
  • Variables in Python - 3 minutes
  • Reference Counting - 5 - 8 minutes
  • Interning - 5 minutes
  • Garbage Collection: - 10 minutes
    • Types of GC
    • What does python use?
  • Some optimizations - 5 minutes


Nothing specific, but having some basic knowledge of Python would be helpful.

Content URLs:

Slides for the talk are available here

Link to this talk given earlier at a HydPy Meetup:

Speaker Info:

Jatin comes with a total of 5+ years of industry experience ranging from Tools and Automation, Cloud Services, REST APIs and right now Programmatic Advertising, where most part of the journey has been along the lines of Core Python and Standard Library

Currently working with Spiceworks as Software Engineer II.

Core member of the Hyderabad Python User Group (HydPy) and part of the organizing team for PyCon India 2018 and PyConf Hyderabad 2019

Speaker Links:

Twitter: @_JatinGoel

LinkedIn: GoelJatin

GitHub: GoelJatin


Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: