Although it is less powerful as Visual VM, you can also use some of the java compiler settings in Eclipse.
More precisely, go to Preferences->Java->Compiler->Errors/Warnings and set the level to "error" for the "Resource leak" and "Potential resource leak" problems.
if you are developping this software yourself (which I assume you are), then you could just run the profiler (for example in Netbeans). It can give you a stacktrace and a dump of the memory heap allocation. That is very helpful to pinpoint and resolve a memory-related problem.