public void Dispose() { if (mpfr_ptr != null) { Marshal.FreeHGlobal((IntPtr)mpfr_ptr); mpfr_ptr = null; } }
/* internal void Initializing() * { * Math.Gmp.Native.size_t length = 12U + (size_t)IntPtr.Size; * //Pointer = gmp_lib.allocate(length).ToIntPtr(); * mpfr_ptr = (__mpfr_struct*)Marshal.AllocHGlobal(sizeof(__mpfr_struct)); * } */ public mpfr_t() { mpfr_ptr = (__mpfr_struct *)Marshal.AllocHGlobal(sizeof(__mpfr_struct) + 16); }