R
R.A.
The follwowing remarks taken from the MSDN:
As long as you are using a Timer, you must keep a reference to it. As with
any managed object, a Timer is subject to garbage collection when there are
no references to it. The fact that a Timer is still active does not prevent
it from being collected.
What does this mean?
If I have the following:
class Sample1 : System
{
DataTable dt = new DataTable ();
public process ()
{
while (true)
{
do something
}
}
}
can the dt be delete by the garbage collection?
As long as you are using a Timer, you must keep a reference to it. As with
any managed object, a Timer is subject to garbage collection when there are
no references to it. The fact that a Timer is still active does not prevent
it from being collected.
What does this mean?
If I have the following:
class Sample1 : System
{
DataTable dt = new DataTable ();
public process ()
{
while (true)
{
do something
}
}
}
can the dt be delete by the garbage collection?