-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 for windows #3182
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using libwebsocket for windows, I noticed there are some memory leaks for following cases.
Case 1: memory leak when destroy context (call lws_context_destroy)
If we call lws_context_destroy then it doesn't free the context because of following condition which is true.
pt->inside_lws_service
But in case of unix, it destroys the context in _lws_plat_service_tsi. Following code do that:
if (pt->destroy_self) {
lws_context_destroy(pt->context);
return -1;
}
This code was committed in 2020.
commit 271ca83
Author: Andy Green andy@warmcat.com
Date: Thu Jan 23 11:12:28 2020 +0000
When I tried the same code for windows, memory leak issue got fixed.
Can I use this same code & is it confirm that it will not make any impact?
OR am I using libwebsocket in wrong way & don't need to use this code?
Please suggest.
To send any data I call lws_callback_on_writable before lws_service.
Please suggest.
The text was updated successfully, but these errors were encountered: