|Main Archive Page > Month Archives > wireshark-dev archives|
2011/5/2 Jeff Morriss <firstname.lastname@example.org>:
> Would it be simpler (and more generic) to have a "cleanup"/EOF routine
> similar to the init mechanism but called as soon as we reach (the final) EOF
> (before the se memory is freed)?
May be my C++ experience have corrupted my mind, but I would say no. Not
simpler. You will lack of the context in this mega-super-generic
routine. So you'll
have to create your own mechanism to restore the context for each memory
chunk you want to work with. In this sense, the current situation is pretty much
the same, AFAIK. Look, for example, at the SSL dissector. Thus creating such
mechanism each time you write a dissector is:
1) Reinventing the wheel.
2) Costs you at least the same resources as my solution.
-- Max ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <email@example.com> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:firstname.lastname@example.org?subject=unsubscribe