I just had an interview, and I was asked to create a memory leak with Java.
Needless to say, I felt pretty dumb having no clue on how to eve
Everyone always forgets the native code route. Here's a simple formula for a leak:
malloc
free
Remember, memory allocations in native code come from the JVM heap.