Quick Answer
Python uses reference counting as primary memory management - each object tracks how many references point to it. When count drops to 0, memory is freed immediately. A cyclic garbage collector handles reference cycles (A references B, B references A). CPython manages memory in pools and arenas via pymalloc. You can force GC with gc.collect() but rarely need to.
Answer
Python uses automatic memory management: • Reference counting • Garbage collector for circular references • No manual allocation/deallocation needed.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.