I wonder if gc.get_objects() actually gives all the objects declared(specially the ones on GPU), maybe there is some C level API which is creating object and the reference is dangling somewhere out of the scope and gc is not able to access those objects. I am not sure about this but let me know your thoughts