Exemplo n.º 1
0
 public void Dispose()
 {
     Stop();
     _programExecutor.Dispose();
     Vixen.Sys.Execution.ReleaseContext(this);
     GC.SuppressFinalize(this);
 }
Exemplo n.º 2
0
        override protected void Dispose(bool disposing)
        {
            if (disposing)
            {
                _programExecutor.SequenceStarted -= _programExecutor_SequenceStarted;
                _programExecutor.SequenceEnded   -= _programExecutor_SequenceEnded;
                _programExecutor.ProgramStarted  -= _programExecutor_ProgramStarted;
                _programExecutor.ProgramEnded    -= _programExecutor_ProgramEnded;
                _programExecutor.Message         -= _programExecutor_Message;
                _programExecutor.Error           -= _programExecutor_Error;

                _programExecutor.Dispose();
                _programExecutor = null;
                // In case we're being disposed by something other than the
                // act of being released.
                VixenSystem.Contexts.ReleaseContext(this);
            }
        }