If an object reference is set to null, will the Garbage Collector immediately free the memory held by that object?

Technology Community › Category: Java › If an object reference is set to null, will the Garbage Collector immediately free the memory held by that object?
VietMX Staff asked 5 years ago

No, the object will be available for garbage collection in the next cycle of the garbage collector.