On Wed, Mar 11, 2009 at 11:41 AM, R. Diez <[email protected]> wrote: > I find the the suggested leak-debugging procedure cumbersome and error-prone. > It would be > nice if all malloc'ed memory were free'd on shutdown. I guess that would be > inside > snmp_shutdown(), or maybe I'm just missing some clean-up call somewhere.
I had a look at init_mib_modules(). Apparently a mechanism for cleaning up memory allocated by MIB modules already exists: the configure script not only generates the source file mib_module_init.h but also mib_module_shutdown.h. The source code in this last header file is called at shutdown time (from _shutdown_mib_modules()). So if my interpretation of the Net-SNMP source code is correct, it is sufficient to implement shutdown_<module> functions for each of the modules. See also proxy.h and proxy.c for an example. Bart. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
