示例#1
0
        public bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                disposedValue = true;

                if (this._nearest != null)
                {
                    this._nearest.Dispose();
                }

                if (this.BufferHandle.IsAllocated)
                {
                    SWIGTYPE_p_grib_multi_handle mh = new SWIGTYPE_p_grib_multi_handle(this.Handle.Reference.Handle, false);
                    GribApiProxy.GribMultiHandleDelete(mh);
                    this.BufferHandle.Free();
                }
            }
        }
示例#2
0
        public bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                disposedValue = true;

                if (this._nearest != null)
                {
                    this._nearest.Dispose();
                }

                if (this.OwnsMemory)
                {
                    SWIGTYPE_p_grib_multi_handle mh = new SWIGTYPE_p_grib_multi_handle(this.Handle.Reference.Handle, false);
                    GribApiProxy.GribMultiHandleDelete(mh);
                    // Marshal.FreeHGlobal(this.NativeBuffer);
                    this.NativeBuffer = IntPtr.Zero;
                }
            }
        }