next up previous contents
Next: PIKECLASS - keyword Up: The CMOD API Previous: INIT - keyword   Contents

EXIT - keyword

EXIT is used to set an exit callback. What stands in between the curly brackets of EXIT is what will be done just before an object of that class is being garbage collected. In the example memory allocated and held as an object variable is freed before the object is garbage collected.
/*Example of usage:*/
   EXIT{
     free(THIS->buffer);
   }



2003-03-04