//关闭文件 public void Close() { // 释放内存 if (buf != IntPtr.Zero) { Marshal.FreeHGlobal(buf); buf = IntPtr.Zero; } //释放压缩流 if (streamCompressed != IntPtr.Zero) { Win32.AVIStreamRelease(streamCompressed); streamCompressed = IntPtr.Zero; } //释放流 if (stream != IntPtr.Zero) { Win32.AVIStreamRelease(stream); stream = IntPtr.Zero; } //释放文件 if (file != IntPtr.Zero) { Win32.AVIFileRelease(file); file = IntPtr.Zero; } }
// Close file public void Close() { // free unmanaged memory if (buf != IntPtr.Zero) { Marshal.FreeHGlobal(buf); buf = IntPtr.Zero; } // release compressed stream if (streamCompressed != IntPtr.Zero) { Win32.AVIStreamRelease(streamCompressed); streamCompressed = IntPtr.Zero; } // release stream if (stream != IntPtr.Zero) { Win32.AVIStreamRelease(stream); stream = IntPtr.Zero; } // release file if (file != IntPtr.Zero) { Win32.AVIFileRelease(file); file = IntPtr.Zero; } }
// Close file public void Close() { // release frame open object if (getFrame != IntPtr.Zero) { Win32.AVIStreamGetFrameClose(getFrame); getFrame = IntPtr.Zero; } // release stream if (stream != IntPtr.Zero) { Win32.AVIStreamRelease(stream); stream = IntPtr.Zero; } // release file if (file != IntPtr.Zero) { Win32.AVIFileRelease(file); file = IntPtr.Zero; } }