Wireshark-dev: Re: [Wireshark-dev] allocating memory for hf_register_info
From: "Luis EG Ontanon" <[email protected]>
Date: Wed, 9 Jan 2008 17:03:07 +0100
On Jan 9, 2008 10:09 AM, Richard Kümmel <[email protected]> wrote:
> instead using
>         static hf_register_info hf[]
> i would like to create this array dynamically from and pass it to
> proto_register_field_array.
> I create this array from statically stored arrays of my own.
> This worked fine. but when can i free this memory again. I did not find any
> unregister function
> callback to use.

As the data contained in the HF array has to persist for as long as
the instance of wireshark is running there's no need to free such
array, the OS itself will take care of release the memory (ad other
resources used) as part of the process being terminated.