Create MemoryCheck.java

Use System.gc(). (Understanding Garbage collection concept.)