-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[jsscripting] Potential memory leak #18224
Comments
…riptEngine Fixes openhab#18224. Signed-off-by: Florian Hotze <[email protected]>
Looks like you are right. |
@florian-h05 I found out after this fix, that the lifecycle hook does not work anymore. Neither in jsscripting nor in pythonscripting
the context is closed, before the dispose hook is called. The exception is then
my problem is that I depend on this hook, because I use it to cleanup python threads. in pythonscripting the exception looks a bit different, it shows that the context was canceled before the hook is called.
|
I solved the followup lifecycleTracker problem by replacing the openhab lifecycleTracker in the ScriptContext with my own implementation which is called directly before the PythonScriptEngine.close |
After I played with my own pythonscripting binding I found maybe a potential memory leak in your binding too.
The function OpenhabGraalJSScriptEngine.close is Override the function DelegatingScriptEngineWithInvocableAndCompilableAndAutocloseable.close()
That means that the close function there is never called and the delegate (GraalJSScriptEngine) is also never closed.
Maybe I'm missing something. That's why I'm posting my issues here to clarify whether I'm wrong.
The text was updated successfully, but these errors were encountered: