employer cover photo
employer logo

Pergunta de entrevista da empresa Acquity Group

How do you perform optimization of a Java application? And more specifically what is a 'memory leak' and how do you prevent this with optimization?

Resposta da entrevista

Sigiloso

27 de fev. de 2012

The first part is easy, there can be many answers (using various profiling tools, code inspection, analyze response time of io,database,network etc). The second part is harder: 'A memory leak in a Java program occurs when object references that are no longer needed are unnecessarily maintained.' And the third part is very hard (it puts the first 2 concepts together): Since memory leaks don't throw direct errors you need to use optimization techniques like memory profiling and/or heap debugging. Oracle has some great docs on the topic.