[ First - *please* don't mail me privately, without copying
     any responses to the mailing list.  I don't have the time
     or inclination to offer private, unpaid, SNMP consultancy.
     Keep discussions to the list, where others can both learn
     and offer advice.  Thanks.   ]
 

On Thu, 2005-04-28 at 10:36, Emmanuel Doguet wrote:
> Dave Shield wrote:

> > Depending on exactly what you mean by "dynamic allocating",
> > one approach would be to free the table at the very end of
> > your handler routine.
> 
> Okay. I'have try this. Do my "malloc" in the "get_first" and the "free" 
> at this end of "Handler".
> 
> But with this, when browse is out of range in "get_next" (I'm return 
> NULL) so Handler is not call... and so not freeing the table :/

Yup - good point.
I'd got the impression that there was a "free" hook that could be
called following the handler, but checking the code, that doesn't
seem to be the case.

You might be able to do something with the 'free_loop_context_at_end'
hook, but it feels something of a hack.

> Another idea?

Not relating to the iterator itself, no.  Wes?  Any suggestions?

I've already offered a possible alternative:

> >   Alternatively, you could use the cache_handler to load
> > the table data before starting to process the table


> I need update table for sending it (like process running ...).
>  But with iterator method , we browse table each time :/

Sorry - I'm not quite sure what you mean by this.

What would be the problem in using the cache handler to load
the table data (retaining it for 5 seconds, say), and letting
the free routine release it again, when this time had expired?

Dave



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to