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

Technology CommunityCategory: JavaIf an object reference is set to null, will the Garbage Collector immediately free the memory held by that object?
VietMX Staff asked 4 years ago

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