Wireshark-dev: Re: [Wireshark-dev] p_add_proto_data() memory handling question
From: "ronnie sahlberg" <ronniesahlberg@xxxxxxxxx>
Date: Tue, 29 Aug 2006 07:18:39 +1000
No it just means that p_add_proto_data() will not manage your memory and release it.

If you allocate the memory using malloc() it is your responsibility to release it when required.   p_add_proto_data() will not do that for you.


If you use se_alloc() the data will be released for you by the emem functions.




On 8/29/06, Stephen Fisher < stephentfisher@xxxxxxxxx> wrote:

In regard to the p_add_proto_data() and p_get_proto_data() functions,
README.developer says that "The data pointers passed into the
p_add_proto_data a re not managed by the proto_data routines. If you use
malloc or any other dynamic memory allocation scheme, you must release
the data when it isn't required."

Does this man that even data allocated by se_alloc() will not be
released automatically?


Steve
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev