A
Andy Fish
hi,
i have a class called foo that has a method called ~foo (well it might not
be a method but I'm not worried about the actual semantics here)
from what I can tell this makes it a destructor which means it should get
called when the object is disposed of by the runtime. presumably this
includes when the appdomain exits as well as when the GC needs to run to get
more memory?
however, mine is never being invoked. FWIW this is part of a windows service
anyone know what is happening here? what is the accepted best practice for
having some code run when an object is being disposed of ?
TIA
Andy
i have a class called foo that has a method called ~foo (well it might not
be a method but I'm not worried about the actual semantics here)
from what I can tell this makes it a destructor which means it should get
called when the object is disposed of by the runtime. presumably this
includes when the appdomain exits as well as when the GC needs to run to get
more memory?
however, mine is never being invoked. FWIW this is part of a windows service
anyone know what is happening here? what is the accepted best practice for
having some code run when an object is being disposed of ?
TIA
Andy