gmp_lib.mpz_clear Method

GMP Native Interface for .NET

gmp_libmpz_clear Method
Free the space occupied by x.

Namespace:  Math.Gmp.Native
Assembly:  Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void mpz_clear(
	mpz_t x
)
Public Shared Sub mpz_clear ( 
	x As mpz_t
)
public:
static void mpz_clear(
	mpz_t^ x
)
static member mpz_clear : 
        x : mpz_t -> unit 

Parameters

x
Type: Math.Gmp.Nativempz_t
The integer.
Remarks

Call this function for all mpz_t variables when you are done with them.

Examples
// Create and initialize a new integer x.
mpz_t x = new mpz_t();
gmp_lib.mpz_init(x);

// Assert that the value of x is 0.
Assert.IsTrue(gmp_lib.mpz_get_ui(x) == 0U);

// Release unmanaged memory allocated for x.
gmp_lib.mpz_clear(x);
' Create and initialize a new integer x.
Dim x As New mpz_t()
gmp_lib.mpz_init(x)

' Assert that the value of x is 0.
Assert.IsTrue(gmp_lib.mpz_get_ui(x) = 0UI)

' Release unmanaged memory allocated for x.
gmp_lib.mpz_clear(x)

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also