Hi Vikas, To my understanding you only need to decref avro_value_t that you allocate with avro_generic_value_new. So you don’t need to decref values that you get from avro_value_get_by_name. You can run your example program with valgrind to verify this.
-Mika > On 03 Dec 2014, at 02:44, Vikas Saxena <[email protected]> wrote: > > Hi all, > Any updates on the nested record thing? > > Thanks, > Vikas > > On Sun, Nov 30, 2014 at 11:31 AM, Vikas Saxena <[email protected]> > wrote: > Thanks Doug, > I am currently doing the same but the function avro_value_decref does not > work as expected for nested records. > I am attaching my test code where I have modified the PERSON_SCHEMA to chnage > the record "person" to have a sub-field "FullName" which in turn is a record > containing two field firstname and lastname. > > The problem is when I try to decref the avro variable for the sub-record, I > get a segmentation fault. > Attached is the source code for your reference. The issue occurs for line > number 117 and 177. > currently I have commented out those two lines. > > If this program runs 24x7 to parse constantly generated files, do u think > there can be a possibility of a memory leak if line 117 and 177 and are left > commented out? > > Thanks, > Vikas > > On Sun, Nov 30, 2014 at 6:12 AM, Douglas Creager <[email protected]> > wrote: > > While invoking the avro_generic_value_free function, I get the error, > > implementation not defined. > > > > I looked through header file but couldn’t find the function. > > > > Is this a known issue? > > That looks like a bug in the documentation. Try avro_value_decref > instead. > > cheers > –doug > > > > -- > Thanks and regards, > Vikas Saxena. > > > > -- > Thanks and regards, > Vikas Saxena.
