Contents

free

Deallocates/releases resources held by the object.

Declaration

virtual void free();

Overview

Classes derived from OSObject should override this function to deallocate or release all dynamic resources held by the instance, then call the superclass's implementation.

Caution:

  1. You can not assume that you have completed initialization before free is called, so be very careful in your implementation.

  2. OSObject's implementation performs the C++ delete of the instance, so be sure that you call the superclass implementation last in your implementation.

  3. free must not fail; all resources must be deallocated or released on completion.

See Also

Miscellaneous