Пример #1
0
 public void Dispose()
 {
     if (mpfr_ptr != null)
     {
         Marshal.FreeHGlobal((IntPtr)mpfr_ptr);
         mpfr_ptr = null;
     }
 }
Пример #2
0
        /*    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);
        }