Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>>> Q: Whenever Python exists, why isn’t all the memory de-allocated?

Is it me or this sentence makes no sense?



I think it's a typo: "Whenever Python EXITS, why isn't..."


I think so too, but that still leaves the problem that the statement is false. I was really puzzled by this one.


I think that OP is making a distinction between "deallocated by python's GC" and "dropped on the floor for the OS to collect".

Maybe a practical phrasing would be: "why does running Valgrind on a Python app show that some memory was never freed".


Is it because there might be another Python process running, that was started after this one started, that has mapped the same executable or shared libraries?


Yes, it's a typo, will change




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: