Closed kbirk closed 8 months ago
Can you please create a minimal example that reproduces this problem?
So I was digging a bit deeper and realised that the leak only occurs if I use the network simulator over an unreliable unordered channel.
I've attached some code that when run as a test inside test.cpp
can cause the leak.
Could it be that the network simulator may be holding onto certain packets to simulate latency or duplicates and those are not being properly deallocated before BaseClient::DestroyInternal()
deallocates the network simulator?
Sounds likely!
Seems to be fixed
Hello,
I've been using libyojimbo for a small gamedev project. It's been great so far, however I've encountered an issue where occasionally when I call
Disconnect
I get the following output:I'm not entirely sure what I've done that could be causing the leak, I've followed
secure_client.cpp
andUSAGE.md
exactly, the only difference is that I'm also using the network simulator to add some latency, packet loss, duplicates and jitter.It happens about once in every ten or so disconnects. Other than the above error when I disconnect everything works perfectly. Memory usage of the program does not increase over time.
The loop / disconnect logic is about as straight forward as:
Should I be calling something before
Disconnect
to ensure everything is cleaned up properly?Is there anything I can do to help debug what I'm doing that is causing the leak?
Thank you for your time.