@hazlin @binkle I'll be honest, I'm getting out of my depth but I would assume there is a deallocation when the reference count of an object hits 0 it would be deallocated (assuming no cyclical references) but this is python, so for all I know the deallocations of objects with 0 reference counts might be queued up and done at certain moments. The gc.collect call is more to try and force collection of objects that have cyclical references that may no longer be valid references (look up generational thresholds or variations of that alongside python to find more info on that)