Right.
It may not be called if the program terminates.
And
It does not get called immediately when an object goes out of scope or is unreferenced. It is called when the GC cleans up the object.
It may not be called if the program terminates.
And
It does not get called immediately when an object goes out of scope or is unreferenced. It is called when the GC cleans up the object.