JVM internally uses a daemon thread called "GARBAGE collector" to destroy all unreferenced objects.
A daemon thread is a service thread. Garbage Collector thread is called daemon thread because it PROVIDESSERVICES to JVM to destroy unreferenced objects.
This thread is low priority thread. Since it is a low priority thread we can not GUARANTEE this execution.