public int freeMemory ( ) { int size = 0 ; for ( int m = 0 ; m < memory . length ; m ++ ) { size += memory [ m ] . length ; memory [ m ] = null ; } memory = null ; return size ; }
This method frees the allocated memory .