home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / formats / off / code / destroyo.c < prev    next >
C/C++ Source or Header  |  1994-06-20  |  682b  |  45 lines

  1.  
  2. /*
  3.  *
  4.  * Description
  5.  *    Destroy the specified object and deallocate all memory resources
  6.  *    associated with it.
  7.  *
  8.  * Output
  9.  *
  10.  * Input
  11.  *    Obj        Pointer to object structure to be deallocated.
  12.  *
  13.  * Diagnostics
  14.  *
  15.  * Author
  16.  *    Randi J. Rost
  17.  *    Digital Equipment Corp.
  18.  *    Workstation Systems Engineering
  19.  *    Palo Alto, CA
  20.  *
  21.  * History
  22.  *    17-Nov-86    Created
  23.  *
  24.  */
  25.  
  26. #include <stdio.h>
  27. #include "off.h"
  28.  
  29. OFFDestroyObj(Obj)
  30.     OFFObjDesc    *Obj;
  31.  
  32.     {
  33.     OFFProperty    *pProp, *nextProp;
  34.  
  35.     pProp = Obj->FirstProp;
  36.     while (pProp != NULL)
  37.     {
  38.     nextProp = pProp->NextProp;
  39.     OFFFreeProperty(pProp);
  40.     pProp = nextProp;
  41.     }
  42.     free(Obj);
  43.     }
  44.  
  45.