public void Dispose() { lock (this) { if (iHandle != IntPtr.Zero) { CpDeviceListDestroy(iHandle); iHandle = IntPtr.Zero; iGch.Free(); } } }