I have a bunch of Objects in an ArrayList
, if I call ArrayList.remove(object)
Do I need to do anything else to remove the object from memory? I am
Java does automatic garbage collection. So once an object is no longer referred to, it can be deleted, that doesn't mean it will be deleted. Garbage collection is automatic, you can ask that it be done by calling System.gc() however this is just a sugestion to run it.
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/System.html#gc%28%29