[ENet-discuss] when to delete allocated buffers?

Jay Sprenkle jsprenkle at gmail.com
Fri Dec 18 15:26:19 PST 2009


Thanks!
I missed the allocation in the enet_packet_create() code.
Just completely overlooked it.

I wanted to make sure I could delete the buffer and not get a rude surprise
when it tried to read data that might not still be there.

Have a good weekend all!


On Fri, Dec 18, 2009 at 4:46 PM, Nuno Silva <little.coding.fox at gmail.com>wrote:

> And just in case you didn't get it, you can delete the data after you tell
> enet to send the packet, since enet creates it's own copy of the data.
>
>
> On Fri, Dec 18, 2009 at 10:38 PM, Lee Salzman <lsalzman1 at cox.net> wrote:
>
>> Packets allocate their own copy of the data, so once you send them, you
>> don't need to free anything since ENet handles that itself. However, the
>> packets ENet gives to you on RECEIVE events, you must remember to destroy
>> them when you are done with them.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20091218/daf371cd/attachment.htm>


More information about the ENet-discuss mailing list