aspnet_wp.exe how to release memory

we have a web service that has no problems when the amount of data to be process is small or medium.  However when the amount of  data to be processed is large the aspnet_wp.exe goes up quite of bit and stays high.  If  we process large volumes a few times sometime we get the system.memory exception.
Is there anyway in the code to force the release of memory for aspnet_wp.exe??
The web service is built in .net 2.0.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

jerrypdConnect With a Mentor Commented:
how are you processing the data? Are you deleting or clearing all your created variables and objects? Sounds like you have a classic memory leak.
chicho12Author Commented:
there is some translation (xsl)  happening and also doing some calculations happening.
We checked to see if we are clearing things up and it looks like we are.

I think the amount of data translated and use to calculate is just very large for some cases.  The memory used for aspnet_wp.exe  goes up and stays up. So there is no way to release the memory? like garbage collection.
If you are certain that you are clearing your objects then that is all you can usually do...
I would double (triple) check that you are really clearing all of them
Miguel OzSoftware EngineerCommented:
You need to use a memory profiler, like:
to check if your program is not building up memory... Trial version for 14 days.

The memory profiler will help you to identify which resources or maybe classes that are kept in memory when your program is running even though they are not needed anymore, based with this information then you can modify your code appropiately (I strongly recommend you to watch the demo video)

You need to look for your classes or .net classes that are still alive after the snapshot. You can safely discard primitive types (like strings, ints, etc)
chicho12Author Commented:
we did another round checking out to make sure we were clearing objects and tha helped quite a bit. Things have improved .  thanks.
All Courses

From novice to tech pro — start learning today.