I have been researching the correct way to organize my solution so that it
makes best use of VB.NET inherent ability to manage resources such as
objects. My solution contains 2 projects and the main problem is that the
mem usage continues to grow until the Service stops responding. I have
received advice to:
"create those objects at a class level; instantiate them when the service
starts, and dispose of them when the service ends. Then include only the
[object handling] code in the timer's elapsed event handler"
This seems simple enough, although I need further clarification. Would it
be best to put the Objects in the Objcls.vb NEW event and FINALIZE event, or
should they be created and finalized in the code class from where they are
being used?
Thanks for your help, a brief example would be appreciated.
Tom
makes best use of VB.NET inherent ability to manage resources such as
objects. My solution contains 2 projects and the main problem is that the
mem usage continues to grow until the Service stops responding. I have
received advice to:
"create those objects at a class level; instantiate them when the service
starts, and dispose of them when the service ends. Then include only the
[object handling] code in the timer's elapsed event handler"
This seems simple enough, although I need further clarification. Would it
be best to put the Objects in the Objcls.vb NEW event and FINALIZE event, or
should they be created and finalized in the code class from where they are
being used?
Thanks for your help, a brief example would be appreciated.
Tom
Comment