Пример #1
0
 protected override void Dispose(bool disposing)
 {
     CasterLogger.Debug("Dispose material10.");
     if (_capeThermoMaterial != null && _capeThermoMaterial.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoMaterial);
     }
     if (_capeThermoCompounds != null && _capeThermoCompounds.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoCompounds);
     }
     if (_capeThermoEquilibriumRoutine != null && _capeThermoEquilibriumRoutine.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoEquilibriumRoutine);
     }
     if (_capeThermoMaterialContext != null && _capeThermoMaterialContext.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoMaterialContext);
     }
     if (_capeThermoPhases != null && _capeThermoPhases.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoPhases);
     }
     if (_capeThermoPropertyRoutine != null && _capeThermoPropertyRoutine.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoPropertyRoutine);
     }
     if (_capeThermoUniversalConstant != null && _capeThermoUniversalConstant.GetType().IsCOMObject)
     {
         Marshal.ReleaseComObject(_capeThermoUniversalConstant);
     }
     _capeThermoMaterial           = null;
     _capeThermoMaterialContext    = null;
     _capeThermoPhases             = null;
     _capeThermoCompounds          = null;
     _capeThermoPropertyRoutine    = null;
     _capeThermoEquilibriumRoutine = null;
     _capeThermoUniversalConstant  = null;
     CasterLogger.Debug("Dispose material10 completed.");
 }