soilrana

Geoprocessing tool leaking memory

Discussion created by soilrana on Apr 13, 2011
Latest reply on May 17, 2011 by jhauck-esristaff
I am using the point solar radiation geoprocessing tool in a loop of around 100000 times. I have noticed that the virtual memory increases tremendously after each loop. Thus after a certain time the program crashes when the virtual memory gets its maximum limit. 

The problem seems that the geoprocessing tool object is unable to release the resources once it goes out of scope. Please note that I have tried almost all possible options to destroy the object (geoprocessing tool) once it goes out of scope. For example, I have tried AOUninitialize.Shutdown()method, ComReleaser.ReleaseCOMObject () method, Marshal.ReleaseComObject() method, Garbage collector etc. but none of those could solve the problem.

Besides, I have tried to execute the geoprocessing tool separately with managed and unmanaged assembly to observe any noticeable changes in the virtual memory consumption. But, unfortunately nothing good happened.

Finally, I have tried to run the code specific for executing the point solar radiation tool in a separate subroutine so that in each loop the program jump in to that separate sub, execute the geoprocessing tool and exit the sub. The idea was, with the exit of sub, the system should release all the resources and allocated memory. But again it failed.

now my queries are:

1. Is there any other way to solve this problem
2. Is this a serious bug still alive in the arcobjects
3. If it is a bug then how long the user have to wait for a solution.

Outcomes