Oh, ok. thanks ! -- Oded Arbel m-Wise Inc. [EMAIL PROTECTED]
Griffin :"I was just thinking what an interesting concept it is to eliminate the writer from the artistic process. If we could just get rid of these actors and directors, maybe we've got something here." -- from "The Player" > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Paul Keogh > Sent: Wednesday, March 06, 2002 4:33 PM > To: 'Kannel-devel (E-mail)' > Subject: RE: How can I free externally allocated buffers ? > > > > I'm trying to use libXML for XML parsing, but some of the functions > > there allocate memory for me (char* strings) and require me to free > > them. but calling gw_free() on memory not allocated with gw_malloc() > > will cause a panic, and I cannot call free() directly. > > > > Is there a simple way to solve this problem ? > > libxml has its own set of memory wrappers. Use them, I guess. > > From xmlmemory.h; > > /* > * The XML memory wrapper support 4 basic overloadable functions > */ > typedef void (*xmlFreeFunc)(void *); > typedef void *(*xmlMallocFunc)(int); > typedef void *(*xmlReallocFunc)(void *, int); > typedef char *(*xmlStrdupFunc)(const char *); > >