cleaned up JavaMemory