-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leaks #4288
Comments
@ranisalt can you check this please? |
@EPuncker definitely, when I return from vacation by the end of the month :) it's one of my main objectives around here, fixing these leaks |
These leaks are at server startup and shutdown, I haven't checked how it looks from the player's perspective (when the player moves, performs actions, etc...), we have a lot of lambdas that have not been checked |
what about reload? does it leak too? |
not tested |
@ArturKnopik
|
@ranisalt how vacation? :) |
one confirmed leak is noted in #3552 |
helgrind.txt |
Funny fact... we have Database singleton that is initialized only... 2 times...
|
im back in time to commit from: |
The first leak in #4288 is related to handle leaking, I couldn't really reproduce how mysql_init is called without mysql_close not being called on the line before, but using a unique_ptr with a custom deleter fixes the leak. Using unique_ptr for MYSQL_RES also fixes eventual leaks that happen on queries.
Hey @ArturKnopik can you update the list? We fixed a bunch of leaks recently :) |
Before creating an issue, please ensure:
support matter (use https://otland.net/forums/support.16/ for support)
Steps to reproduce (include any configuration/script required to reproduce)
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
valgrind --leak-check=full ./tfs
wait for full startup
ctrl+c
Expected behaviour
no memory leak
Actual behaviour
memory leaks
leaks.txt
Environment
VirtualBox
artur@artur-VirtualBox:/media/sf_forgottenserver_AK$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
NOTES
Possible source of leaks
92b35aa
https://stackoverflow.com/questions/59483862/c-lambda-function-cause-memory-leak
The text was updated successfully, but these errors were encountered: