lifetime of the objects Shared

  • Thread starter Thread starter Eduardo Azevedo
  • Start date Start date
E

Eduardo Azevedo

If I have a class with method Shared, when this objects are destroies what's
happend with the objects Shared?

How long is the lifetime of a function shared in the Class ?

there are no instantiate

tks

Eduardo R Azevedo
 
Eduardo,
If I have a class with method Shared, when this objects are destroies what's
happend with the objects Shared?

How long is the lifetime of a function shared in the Class ?

Why do you care about the lifetime of a method? A runtime could throw
away or re-JIT a method's code any time it wants to, but you shouldn't
worry about that.

If you have any Static locals in that method, they heve the lifetime
of the AppDomain, just like Shared data members on the class.



Mattias
 
Back
Top