Wireshark mailing list archives
Re: [PATCH] Re: Freeing memory of se_alloc'ated object
From: Max <dmitrmax () gmail com>
Date: Tue, 3 May 2011 02:28:18 +0400
2011/5/2 Jeff Morriss <jeff.morriss.ws () gmail com>:
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 <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object, (continued)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object darkjames-ws (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jakub Zawadzki (May 03)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jeff Morriss (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Guy Harris (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object ronnie sahlberg (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max Dmitrichenko (May 02)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Stephen Fisher (May 03)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Jeff Morriss (May 03)
- Re: [PATCH] Re: Freeing memory of se_alloc'ated object Max (May 02)