Re:Creating a memory leak with Java
by daemin on Wednesday April 19, 2017 @06:47AM
(#14146813)
That's the classic example of a memory leak in a GC language. Where you add objects to some list or map so that they can be looked up quicker than being created again. Some people call it a cache. What people forget though is some way of removing the items from the cache, and so it leaks these objects for the lifetime of the application.
Not really as sophisticated as other ways of leaking memory, but it can also be easily done in all other languages.
Not really as sophisticated as other ways of leaking memory, but it can also be easily done in all other languages.