mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
clean up resources
This commit is contained in:
@ -295,7 +295,21 @@ bool Init()
|
|||||||
|
|
||||||
void DeInit()
|
void DeInit()
|
||||||
{
|
{
|
||||||
// TODO: cleanup resources properly!!
|
if (DiscoverySocket)
|
||||||
|
{
|
||||||
|
closesocket(DiscoverySocket);
|
||||||
|
DiscoverySocket = INVALID_SOCKET;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (!RXQueue.empty())
|
||||||
|
{
|
||||||
|
ENetPacket* packet = RXQueue.front();
|
||||||
|
RXQueue.pop();
|
||||||
|
enet_packet_destroy(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
enet_host_destroy(Host);
|
||||||
|
Host = nullptr;
|
||||||
|
|
||||||
enet_deinitialize();
|
enet_deinitialize();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user