mark the free and clear function to use a volatile modifier to prevent the optimizer from optimizing away the zeroing