I am writing a powershell based monitoring program. This program needs to "run all the time". I noticed that running overnight that I get "out of memory" errors. When I put code in the $timer1.tick brackets causes a memory leak ie. consumption to monotonically increasing until I run out of memory. It happens fast enought that running in 64bit mode does not seem to make any difference.
Is there any best practice for avoiding these memory leaks?
Memory Leak when using timer
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.