home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / math / ols / matfree.inc < prev    next >
Encoding:
Text File  |  1993-07-28  |  456 b   |  23 lines

  1.  
  2. {
  3.     free(&(M[rl][cl]));    /* gets rid of matrix */
  4.     free(&(M[rl]));    /* gets rid of column of row pointers */
  5. }
  6.  
  7. /*
  8.  
  9. The data structure is:
  10.  
  11. M --> [0 1 2]
  12.      | | |
  13.        | | |
  14.        | | +----> [21 22 23]
  15.        | +------> [11 12 13]
  16.        +--------> [01 02 03]
  17.  
  18. The elements 01..03..13..23 are one memory block.  So issuing a
  19. free with the pointer to 01 frees the entire block.  Once that is
  20. done, we can free the row of pointers.
  21. */
  22.  
  23.