+1 vote
in JAVA by
How is garbage collection controlled?

1 Answer

0 votes
by

Garbage collection is managed by JVM. It is performed when there is not enough space in the memory and memory is running low. We can externally call the System.gc() for the garbage collection. However, it depends upon the JVM whether to perform it or not.

...