-
Notifications
You must be signed in to change notification settings - Fork 50
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 leak when passing anonymous functions to lua interpreter #26
Comments
I can affirm this behavior, also on older PHP and older php-lua versions:
|
Hey there, I was wondering whether I could somehow help fixing this problem. Does anyone have any pointers where to start investigating this? |
#31 fixes this. |
the problem is these callbacks are stashed as lua class's static properties.. which could only be reclaimed in request shutdown phase. hmm, yeah it is better to reclaim it after object's destruction... but, need some work to do... |
the PoC still shows the same memory leak, am I doing anything wrong here? I don't see a difference with the latest version:
|
When passing anonymous PHP functions to LUA using
assign
orregisterCallback
, some memory is not reclaimed when the Lua object is unset.See https://github.com/ComaVN/php-lua-memoryleak for a proof of concept.
The text was updated successfully, but these errors were encountered: