Java / Garbage collection
How do you trigger garbage collection through Java code?
The methods System.gc() and Runtime.gc() may be used to send request of Garbage collection to JVM but it is not guaranteed that garbage collection will happen.
We can call finalize method manually however that also does not guarantee object be garbage colllected.
More Related questions...