No, all that does is hint at the Java Virtual Machine (the native program that handles running compiled Java bytecode) to use the garbage collector of choices scan algorithm to remove dead references from memory.
A memory leak is caused (at least in Java's case) when a reference lingers to an unused object... therefor a garbage collection cycle wouldn't have an effect because the virtual machine still thinks the object is being used.
On a side note, however, it's possible that is there are a lot of allocations and deallocations (such as ByteBuffer being used in some sort of Packet wrapper), those objects can linger and take up massive amounts of memory, causing any subsequent full garbage collections to take a long time. If you are having memory issues, leave the explicit calls in code and then try your server with the
switch to let the virtual machine handle the garbage collection cycles. You'll have to watch performance and compare the two to see which one makes more sense for your server.Code:-XX:-DisableExplicitGC