Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is not a programming question, but i want to know the theory behind such programs. There is a program called Cleanmem http://www.pcwintech.com/cleanmem[^] which automatically releases memory on schedule. Cleanmem author talks about using Windows API to achieve this. But i don't get it. How do they release memory automatically when memory reaches certain limit? In windows, some applications release memory when they are in "Minimized" state. I would want to implement such in my programs so that it releases memory itself after some time. I develop applications using C# on visual studio 2005.
Posted

1 solution

In C#, you release memory and resources by calling Dispose on objects that offer it, and perhaps from forcing the garbage collector to run, which you should not need to do unless you have a lot of big files in your app ( videos or images perhaps )
 
Share this answer
 
Comments
Praveen Kullu 26-Jul-11 14:27pm    
Actually i wanted to take control of the resources because i am developing a desktop application using ado.net for an institution which will be running 10 hours a day continuously. Such an application will surely get heavier on resources with time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900