public void Dispose() { // Load the class ClassHolder instance; // Protected lock (this) { // Load instance = m_Class; // Forget m_Class = null; } // Wipe out if (null != instance) { // Try to stop try { // Shut down _EnableDataDMA( instance.ClassPointer, false ); } catch { // Ignore any error } // Discard instance.Dispose(); } }
/// <summary> /// On the first call <see cref="ClassHolder.Dispose"/> is called on the /// <see cref="m_Class"/> wrapper. /// </summary> public void Dispose() { // Forward if (null != m_Class) m_Class.Dispose(); // Once m_Class = null; // No need to finalize GC.SuppressFinalize( this ); }
/// <summary> /// Create a new <i>CString</i> initialized with the indicated data. /// </summary> /// <param name="sData">Initial data.</param> public MFCString( string sData ) { // Create memory m_Class = new ClassHolder( 4, 0 ); // Construct it CString_Construct( m_Class.ClassPointer, sData ); // Prepare for shut down m_Class.Destructor = new ClassHolder.DestructHandler( CString_Destruct ); }
public Frontend() { // Create the MFC wrapper m_Class = new ClassHolder( TTBudget.LegacySize.CDVBFrontend ); // Construct C++ instance _Construct( m_Class.ClassPointer ); // Attach destructor m_Class.Destructor = new ClassHolder.DestructHandler( _Destruct ); }
/// <summary> /// Create a new <i>CString</i> initialized with the indicated data. /// </summary> /// <param name="sData">Initial data.</param> public MFCString(string sData) { // Create memory m_Class = new ClassHolder(4, 0); // Construct it CString_Construct(m_Class.ClassPointer, sData); // Prepare for shut down m_Class.Destructor = new ClassHolder.DestructHandler(CString_Destruct); }
/// <summary> /// On the first call <see cref="ClassHolder.Dispose"/> is called on the /// <see cref="m_Class"/> wrapper. /// </summary> public void Dispose() { // Forward if (null != m_Class) { m_Class.Dispose(); } // Once m_Class = null; // No need to finalize GC.SuppressFinalize(this); }
public FilterToCode( ushort pid, Action<byte[]> callback ) : base( pid ) { // Remember m_FilterQueue = new FilterQueue( callback ); // Create the MFC wrapper m_Class = new ClassHolder( TTBudget.LegacySize.CDVBTSFilter ); // Construct C++ instance _Construct( m_Class.ClassPointer ); // Attach destructor m_Class.Destructor = new ClassHolder.DestructHandler( _Destruct ); // Overload virtual function m_Class[1] = new InternalDataArrivalHandler( OnDataArrival ); }
public FilterToFile( ushort pid, string filePath ) : base( pid ) { // Create the MFC wrapper m_Class = new ClassHolder( TTBudget.LegacySize.CDVBFilterToFile ); // Construct C++ instance _Construct( m_Class.ClassPointer ); // Attach destructor m_Class.Destructor = new ClassHolder.DestructHandler( _Destruct ); // Create MFC string using (MFCString path = new MFCString( filePath )) { // Configure file - flags are Create and Write _SetFileParams( m_Class.ClassPointer, path.ClassPointer, 0x1001 ); } }
public void Dispose() { // Load the class ClassHolder instance; // Protected lock (this) { // Load instance = m_Class; // Forget m_Class = null; } // Wipe out if (null != instance) instance.Dispose(); }
public virtual void Dispose() { // Make sure that filter is deactivated Stop(); // Load the class ClassHolder instance; // Protected lock (this) { // Load instance = m_Class; // Forget m_Class = null; } // Wipe out if (null != instance) instance.Dispose(); }