Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Wireshark Final Cleanup Function/Hook?

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Wed, 29 Aug 2012 00:35:30 +0200
Hello Drik,

On Tue, Aug 28, 2012 at 02:58:46AM +0200, Dirk Jagdmann wrote:
> is there a way to register a cleanup function in a dissector to be
> called when a file closed? I have a couple of hash tables allocated
> using g_hash_table_new() that I want to free when the user closes
> the file.

What you may want is one of the seasonal allocation functions. For details
please take a look at doc/README.malloc.
If you have further questions, don't hesitate to ask.

Ciao
   Jörg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.