What is causing the memory leak in the provided Java code example