M
msnews.microsoft.com
Public Class Controller
Dim mx As New HelperClass 'here, where I have it now ????
Sub New()
'or here??? Dim mx As New HelperClass
End Sub
************************************************************************
I am creating a windows service and I want to make sure I am being efficient
with memory.
I call the Controller class above from my Timer1_Elapsed event in the
windows service.
Should I instantiate HelperClass at the class level as I have it now or in
the New()?
What are the implications of doing it one way or the other?
Thank you,
-hazz
Dim mx As New HelperClass 'here, where I have it now ????
Sub New()
'or here??? Dim mx As New HelperClass
End Sub
************************************************************************
I am creating a windows service and I want to make sure I am being efficient
with memory.
I call the Controller class above from my Timer1_Elapsed event in the
windows service.
Should I instantiate HelperClass at the class level as I have it now or in
the New()?
What are the implications of doing it one way or the other?
Thank you,
-hazz
.