Java Utililty Methods Memory Clear

List of utility methods to do Memory Clear

Description

The list of methods to do Memory Clear are organized into topic(s).

Method

voidCleanMemory()
Clean Memory
Runtime r = Runtime.getRuntime();
r.gc();
longcleanMemory()
clean Memory
Runtime.getRuntime().gc();
return freeMemory();
voidclearMemory()
clear Memory
System.gc();
System.gc();
System.gc();
System.gc();
voidpurgeMemory()
purge Memory
voidpurgeMemory()
purge Memory
try {
    long tmpIsFree = runtime.freeMemory();
    long tmpWasFree;
    byte[] a1 = null;
    byte[] a2 = null;
    byte[] a3 = null;
    byte[] a4 = null;
    byte[] a5 = null;
...