I have written a server that accepts a batch of route requests and returns route maps and directions for each such requests. The problem is that everytime calculate() method is called the VM size of the process grows and calling the clear() method of the route does not seem to release all the allocated memory (The process grows by 500k each time for a route containing two waypoints and two pushpins). I even explicitly delete the waypoints and pushpins. I have tried to use newmap() between each requests and even called quit() method on the application object and instantiated a brand new one. None of these helped.
Are there any other datasets (e.g. directions) that need to be explicitly released and, if so, how.