I see this code runs a garbage collection cleaning the unused java objects. I assume this should be handled internally by IS architecture.
Analyse why the IS is consuming more memory, you have to check at IS level. Fine tuning the IS or re-sizing the JVM memory.
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods