Exemplo n.º 1
0
 protected virtual void Dispose(bool disposing)
 {
     Refs.Dispose(hFocusedApplicationEvent);
     Refs.Dispose(hWindowTitleChangeEvent);
     // TODO: we must find a way to keep those delegate references alive. Ts there really no way in .NET to really keep these delegates from being collected?
     // Putting GC.KeepAlive will at least prevent the compiler from optimizing out the field references, but it is still possible that the delegate is collected earlier
     // during a gc run
     GC.KeepAlive(_HandleSystemForegroundEvent);
     GC.KeepAlive(_HandleObjectNamechangeEvent);
 }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     Refs.Dispose(CsvWriter);
 }
Exemplo n.º 3
0
 private void DisposeNonDesigner(bool disposing)
 {
     Refs.Dispose(systemFocusTitleListener);
 }
Exemplo n.º 4
0
 private void ActivityMonitorMainForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     Refs.Dispose(rowWriter);
 }