PacketPool::~PacketPool() { #ifdef _DEBUG // If this assert hits then not all packets given through GetPointer have been returned to ReleasePointer. // Either // 1. You got a packet from Receive and didn't give it back to DeallocatePacket when you were done with it // 2. You didn't call Disconnect before shutdown, and the order of destructor calls happened to hit the PacketPool singleton before it hit the RakPeer class(es). assert( packetsReleased == 0 ); #endif ClearPool(); }
InternalPacketPool::~InternalPacketPool() { ClearPool(); }
NetSocketPool::~NetSocketPool() { ClearPool(); }