+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.

Related questions

+1 vote
asked Mar 5, 2021 in D Programming by SakshiSharma
0 votes
asked Oct 10, 2020 in JAVA by Robindeniel
...