Ejemplo n.º 1
0
 public void Dispose()
 {
     _semaphore.Do(s =>
     {
         s.Release(1);
         s.Dispose();
     });
     ProfilerRequestsInformation.Do(e => e.Dispose());
     InformationReadyForProfiler.Do(e => e.Dispose());
     InformationReadByProfiler.Do(e => e.Dispose());
     StreamAccessorComms.Do(r => r.Dispose());
     _memoryMappedFile.Do(f => f.Dispose());
     PinnedDataCommunication.Free();
 }
Ejemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed && disposing)
     {
         _disposed = true;
         _semaphore
         .Try(s => s.Release(1))
         .Do(s => s.Dispose());
         ProfilerRequestsInformation.Do(e => e.Dispose());
         InformationReadyForProfiler.Do(e => e.Dispose());
         InformationReadByProfiler.Do(e => e.Dispose());
         StreamAccessorComms.Do(r => r.Dispose());
         _memoryMappedFile.Do(f => f.Dispose());
         PinnedDataCommunication.Free();
     }
 }