08
What is a memory leak ?
A « memory leak » (cf. http://en.wikipedia.org/wiki/Memory_leak) is a situation when program is unable to release memory it has acquired. It happens when objects are hard referenced by other objects so that JVM can’t release them.
Example
public class MemoryLab {
//a collection (a business cache for example)
static HashSet<Integer> aCache = new HashSet<Integer>();
public static [...]