* =?Utf-8?B?QW50aG9ueSBOeXN0cm9t?= <an************@genetibase.com> scripsit:
I have Code that can either be run inline or called as multiple
procedures. What would be the best practice, I like the component model
with procedures but heard that inline executes faster... Thanks in
advance...
Also, why does calling dispose such as with any var.dispose execute faster then simply setting to nothing..
Which is faster:
dim me as var
some code
me = nothing
or
dim me as var
some code
me.dispose
me = nothing
IMO you should not need to care about that, the JITter is/will
be/should be able to do inlining automatically when it makes sense.
To your 2nd question: Setting an instance variable to 'Nothing' is
different from calling its 'Dispose' method. Calling 'Dispose' will
clean up unmanaged resources used by the instance at the time of calling
the procedure.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>