От: | BluntBlind | ||
Дата: | 17.04.07 16:16 | ||
Оценка: | 24 (1) | ||
#Имя: | FAQ.dotnet.timerandgc |
_M_>timer.Enabled = false;
_M_>timer = new Timer();
_M_>
if (value)
{
if (this.timerWindow == null)
{
this.timerWindow = new TimerNativeWindow(this);
}
this.timerRoot = GCHandle.Alloc(this);
this.timerWindow.StartTimer(this.interval);
}
Return Value
A new GCHandle that protects the object from garbage collection. This GCHandle must be released with Free when it is no longer needed.