DEV Community

How Python uses Garbage Collection for Efficient Memory Management

Karishma Shukla on July 07, 2023

What are variables in Python? A variable in Python is usually assumed to be a label of a value. Instead, a variable references an object...
Collapse
 
gaurbprajapati profile image
gaurbprajapati

wow 🔥

Collapse
 
karishmashukla profile image
Karishma Shukla

Thank you! :D

Collapse
 
richarddev_44 profile image
Richard

This is 🔥🔥🔥

Collapse
 
karishmashukla profile image
Karishma Shukla

Thank you!

Collapse
 
felixmertin profile image
Felix Mertineit

Am I missing something or should it under Reference Counting rather be Step 3: reference count of students = 1. Image by author. instead of Step 3: reference count of students = 0. Image by author. ? There is one reference for students label?

Collapse
 
karishmashukla profile image
Karishma Shukla • Edited

Yes you are right. What I wanted to write was the number of references of the integer object with a value of 15 will be 0 (the integer object students was previously referencing to). Updated. Thank you!

Collapse
 
abdulmuminyqn profile image
Abdulmumin yaqeen

well explained!

Collapse
 
karishmashukla profile image
Karishma Shukla

Thank you!

Collapse
 
javinpaul profile image
javinpaul

Nice article, well explained

Collapse
 
karishmashukla profile image
Karishma Shukla

Thank you!

Collapse
 
stankukucka profile image
Stan Kukučka

Perfect. Right into details.

Collapse
 
karishmashukla profile image
Karishma Shukla

Thank you!

Collapse
 
pravneetdev profile image
Pravi

This taught me so many things. Great article.

Collapse
 
karishmashukla profile image
Karishma Shukla

Glad it was helpful :)

Collapse
 
test_tool profile image
test on

Great explanation..