Windows Service Rant
-
Actually this is probably a .NET rant. My newly developed service was slowly but surely using more and more memory. Surely, it couldn't be a memory leak because only managed objects where used! Turns out every time a local variable is declared (even a base value type) the memory usage would go up (o.k., that is expected) but what I really didn't expect was for the memory to stay used when the value objects went out of scope! eh, what can you do? Sure the memory will be freed when garbage collection runs but it is embarrassing to see my service slowly take up more and more memory! Looks like I may have a use, after all, for my object pool code.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane
I had a thought - if the objects are too big, they get put on a different heap - one that isn't affected by the garbage collector. Someone else pointed out that you said "local" variable. It might be that the GC won't delete them because it sees them as still in use, so you might want to look into making it global (and maybe static) to the service itself, yet outside the service1 class itself. Maybe also make it disposable.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001