In an Apple interview for a java developer position I was asked what to suspect when seeing the memory usage of an application keeps on increasing constantly (say by looking at Task manager of Windows). Assuming we have access to the source code however it is composed of thousands of lines of code and we can not read the code one by one. He meant what would I look for in the code for memory leak. I listed some of occasions I knew from here:Creating a memory leak with Java yet he was not satisfied. What else could I say? (PS. i got to the next round of interview but still I don't know the answer to this question)
Asked
Active
Viewed 40 times
0
-
2Does the person with the accepted answer get your first paycheck? – nhgrif Nov 08 '13 at 00:59
-
@nhgrif humm! sorry i thought you are here to help for free – C graphics Nov 08 '13 at 01:00
-
1@Cgraphics Once in a while we don't mind accepting gratuity :) – Nov 08 '13 at 01:03
-
1For starters, with Java, you'd need to confirm that it really was increasing *constantly* and not just getting pretty big. If you're constantly creating and destroying lots of objects, the JVM may keep a big memory allocation from the OS so that it can run more smoothly, but this will stabilize over time. If you really do think you have a "leak", then you'd really need to run a profiler to see what's taking up the memory. – chrylis -cautiouslyoptimistic- Nov 08 '13 at 01:03
-
@NishantShreshth I may consider referring you guys, you know.Only if you prove it here. – C graphics Nov 08 '13 at 01:05