Just a guess. The Garbage Collector.
Since there is no reference to the object the Reference Counter to this memory address is 0 so the Garbage Collector is invoked and you see the result. What is GC and how it works is another question.
See this: https://www.youtube.com/watch?v=F6u5rhUQ6dU
I think that the CG is called after the RC is set to 0 for an object in the memory. And if that isn't happening the GC is called periodically
Since there is no reference to the object the Reference Counter to this memory address is 0 so the Garbage Collector is invoked and you see the result. What is GC and how it works is another question.
See this: https://www.youtube.com/watch?v=F6u5rhUQ6dU
I think that the CG is called after the RC is set to 0 for an object in the memory. And if that isn't happening the GC is called periodically