Project Euler Solutions
Bcd_destructor

The functions to safely dispose of a BCD_int. More...

void BCD_int::free_BCD_int (BCD_int *const x)
 if x is not constant, this sets all flags to 0, frees used memory, sets nan to true, and error to IS_FREED More...
 

Detailed Description

The functions to safely dispose of a BCD_int.

destructor

Function Documentation

void free_BCD_int ( BCD_int *const  x)

if x is not constant, this sets all flags to 0, frees used memory, sets nan to true, and error to IS_FREED

Parameters
xthe BCD_int you would like to destruct
Remarks
This will take \(Θ(1)\) time if x is constant, and will match the time of free() if not. It is assumed in other time analyses that this function takes constant time, but note that that may not be true in every C implementation. For instance, if your implementation were to clear memory when freed this method would be \(Θ(\log_{100}(x))\).

Here is the caller graph for this function: