/// <summary> /// Dispose Enumerator /// </summary> /// <param name="disposing"> /// A boolean true if the enumerator is being disposed from client code. A boolean false otherwise. /// </param> private void Dispose(bool disposing) { if (!this._disposed) { var pNativeInstructionCount = (UIntPtr)this._nativeInstructions.Length; CapstoneImport.Free(this._pNativeInstructions, pNativeInstructionCount); } this._disposed = true; }
/// <summary> /// Release Handle. /// </summary> /// <returns> /// A boolean true if the handle was released. A boolean false otherwise. /// </returns> protected override bool ReleaseHandle() { CapstoneImport.Free(this.InstructionPointer, this._instructionCount); // Empty Instructions. // // ... this._instructions = Enumerable.Empty <NativeInstruction>(); return(true); }