Garbage collection is a process of disposing off dead objects (not being referred). Garbage collector works automatically though one call it using the following:
Java Code:
System.gc();
While garbage collector is busy disposing off dead objects, one may feel a short pause in the application's execution.