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.

Lee

Jay Sprenkle wrote:
Good afternoon all,

<Newbie usage question alert>

After reading through the enet source it appears that when you send a packet of data a structure containing a pointer to the data is queued up to send. If I malloc() or new a buffer, fill it, then send it, how do I know when I can safely delete it? I don't see an event for sent data, etc.

Thanks!

</Newbie usage question alert>

_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

Reply via email to