Re: Freeing ENetPacket

2015-11-28 Thread Kyle via Digitalmars-d-learn
On Sunday, 29 November 2015 at 01:57:25 UTC, Adam D. Ruppe wrote: .. Are you compiling it as a 64 bit or a 32 bit program? 64 bit. You're probably right, I will take out the explicit destroy and look for a memory leak elsewhere, and adjust for your other suggestions. Thanks for the advice!

Re: Freeing ENetPacket

2015-11-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 29 November 2015 at 01:30:14 UTC, Kyle wrote: void sendUbytes(ENetPeer* dest, ref ubyte[] data) { //create packet ENetPacket* packet = enet_packet_create(cast(ubyte*)data, data.length * ubyte.sizeof, ENET_PACKET_FLAG_RELIABLE); So I'm not familiar with this library, but a no

Freeing ENetPacket

2015-11-28 Thread Kyle via Digitalmars-d-learn
Hi, I have a function using the derelict-enet library: void sendUbytes(ENetPeer* dest, ref ubyte[] data) { //create packet ENetPacket* packet = enet_packet_create(cast(ubyte*)data, data.length * ubyte.sizeof, ENET_PACKET_FLAG_RELIABLE); //send packet to peer over channel id 0