Python Forum

Full Version: zero referenced object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
once an object is no longer referenced, it can eventually be deleted. i see that, at least for CPython, this really does get delayed. is there a way to speed this up, at least for one specific object?
unfortunately, i don't have time, right now, to watch that whole video. maybe later tonight.

i have heard that Python calls these references, not pointers, so i am wondering why she is calling them pointers.
You can manually run a garbage collection
import gc
gc.collect()
Relevant use cases for this don't seem easy to built. One would need a situation where huge or numerous instances' deallocation is postponed by the automatic garbage collector.

If I had this statement in my code, I'd rather investigate if I'm misunderstanding something.
it is deletion by garbage collection that seems to be happening. i just wanted to handle exceptions in __del__(). i'm looking at the issues i run into many different ways, hence many questions to fully understand the details of what is happening.