[Yazlist] The Yaz Odr module and memory management

Mads Bondo Dydensborg mbd at dbc.dk
Wed Sep 17 11:11:45 CEST 2008


Hi there

I am in the process of writing a more friendly C++ interface to the Yaz Odr 
module. Reading through the manual, at 
http://www.indexdata.dk/yaz/doc/odr.use.tkl
I have a question about this statement:

You can't use the normal free(2) routine to free memory allocated by this 
function, and ODR doesn't provide a parallel function. Instead, you can call 
     void odr_reset(ODR o, int size);
    
 when you are done with the memory: Everything allocated since the last call 
to odr_reset() is released. The odr_reset() call is also required to clear up 
an error condition on a stream

Two questions:

1) Whats the size paramenter for? (I reckon it is an error, it is not present 
in the .h files of yaz 3.0.34 at least)

2) I reckon, it is only memory allocated on that particular stream that is 
freed, correct? (The doc states this for some of the other calls, but not 
this).

Regards

Mads

-- 
Med venlig hilsen/Regards

Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77 34




More information about the Yazlist mailing list