|
-
Aug 15th, 2006, 05:55 AM
#1
Thread Starter
Addicted Member
Reduce memory usage?
I have an app which spends most of the time as an icon in the system tray with the form hidden. A timer control runs constantly with a one second interval and when a certain time period has elapsed the app does something.
It's currently using nearly 7.5 MB of memory while just waiting which seems rather a lot.
How can I reduce the figure?
Thanks
Another light-hearted post from Guru 
-
Aug 15th, 2006, 06:21 AM
#2
Hyperactive Member
Re: Reduce memory usage?
I believe memory usage has nothing to do with activity of the program. A good place to start would to be to undeclare, or free variables not actually being used at the time, and/or unload un needed classes while waiting
-
Aug 15th, 2006, 09:12 AM
#3
Re: Reduce memory usage?
One other route would be to split the app into two parts. Have one part that does all of the processing tasks, and the other part that contains the scheduling part (ie. the systray icon and the timer). When the timer fires, have it launch the main application, do whatever it needs to do, then exit and wait for the next cycle.
-
Aug 15th, 2006, 09:18 AM
#4
Re: Reduce memory usage?
Does it use 7.5 MB as soon as it starts running, or does the memory usage keep going up as it runs? If the latter, you have a memory leak.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|