How can I create a memory leak in Java?
Here’s a good way to create a true memory leak (objects inaccessible by running code but still stored in memory) in pure Java: The application creates a long-running thread (or use a thread pool to leak even faster). The thread loads a class via an (optionally custom) ClassLoader. The class allocates a large chunk of … Read more