Subject: Memory management in libdb routines
To: None <port-i386@netbsd.org>
From: Peter Simons <peter.simons@gmd.de>
List: port-i386
Date: 08/22/1998 00:32:39
-----BEGIN PGP SIGNED MESSAGE-----

Hi,

pardon me if this question is a bit off the track for this mailing
list, but I couldn't really think of a better place to ask, so here it
goes:

If I retrieve a key/data pair from a DB-file using the get() method, I
receive the data in a DBT structure. Since I provided the structure
itself when calling get(), I am obviously responsible for free()ing it
when I don't need it anymore, but who is responsible for free()ing the
data contained in the structure? Me? The library? When does it free it
in that case? Must I copy the data into my own memory before calling a
libdb routine again?

Any help is appreciated!

	-peter


PS: Please Cc answers to me.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1

iQCVAwUBNd31hg9HL1s0103BAQGNcwQAnPZW3AeyU/3E4PmNCbzxiDaTybg0gZ+T
uRcrtjq1vMmeNqtKn1nRyNu5GrCaDI84TR8oGW8P6kH+P85aeypCJjbjKiwwvDxp
082yCVbQzX4ge3TIDkk0aeVIKOCCZJ98nqTeik8QtqGBU+cFBJSM8e3x0ledw2/J
MwNZ0SHBGz4=
=PJtb
-----END PGP SIGNATURE-----