home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.informix
- Path: sparky!uunet!psinntp!telesci!jslater
- From: jslater@telesciences.com (John M Slater)
- Subject: Freeing SQLDA Memory
- Message-ID: <1992Dec28.030847.1139@telesciences.com>
- Organization: TeleSciences CO Systems, Inc.
- Distribution: USA.
- Date: Mon, 28 Dec 1992 03:08:47 GMT
- Lines: 23
-
- I need to continually reuse the SQLDA structure in a daemon application.
-
- How does one properly release memory associated with the SQLDA structure
- after being allocated with the DESCRIBE statement.
-
- It would seem that at least two mallocs may have been done, 1 for the SQLVAR
- structure(s) (assuming they point to offsets into the same memory block),
- and one for the SQLDA structure.
-
- Would this scenario be appropriate:
-
- $FREE prepare_stmt;
- free(sqlda->sqlvar);
- free(sqlda);
-
- I'm using ESQL/C 5.0UC1 On an HP9000/857 (HP-UX 8.02).
-
- Thanks In Advance.
- --
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- John M. Slater
- EMail: jslater@telesciences.com
- Phone: +1 609 866 1000 x231
-