On Fri, 22 Sep 2006 11:00:56 +0100 Graeme wrote:
GW> In get_first/get_next I could increment a reference counter which then
GW> gets decremented in free_data_context.
GW> I could therefore lock my data in get_first and when the counter reaches
GW> 0 again in free_data_context I could unlock the data.
GW> This would ensure I always have a valid pointer to my data in the
GW> data_handler.
GW> 
GW> Is there anything I might have missed in this solution?

Maybe.. there is also a free_loop_context_at_end function that could probably
eliminate the need for a counter at all..

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to