home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / informix / 2819 < prev    next >
Encoding:
Text File  |  1992-12-28  |  1.0 KB  |  34 lines

  1. Newsgroups: comp.databases.informix
  2. Path: sparky!uunet!psinntp!telesci!jslater
  3. From: jslater@telesciences.com (John M Slater)
  4. Subject: Freeing SQLDA Memory
  5. Message-ID: <1992Dec28.030847.1139@telesciences.com>
  6. Organization: TeleSciences CO Systems, Inc.
  7. Distribution: USA.
  8. Date: Mon, 28 Dec 1992 03:08:47 GMT
  9. Lines: 23
  10.  
  11. I need to continually reuse the SQLDA structure in a daemon application.
  12.  
  13. How does one properly release memory associated with the SQLDA structure
  14. after being allocated with the DESCRIBE statement.
  15.  
  16. It would seem that at least two mallocs may have been done, 1 for the SQLVAR
  17. structure(s) (assuming they point to offsets into the same memory block),
  18. and one for the SQLDA structure.
  19.  
  20. Would this scenario be appropriate:
  21.  
  22. $FREE prepare_stmt;
  23. free(sqlda->sqlvar);
  24. free(sqlda);
  25.  
  26. I'm using ESQL/C 5.0UC1 On an HP9000/857 (HP-UX 8.02).
  27.  
  28. Thanks In Advance.
  29. -- 
  30. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31.                                  John M. Slater    
  32. EMail:        jslater@telesciences.com
  33. Phone:        +1 609 866 1000 x231
  34.