vide icon indicating copy to clipboard operation
vide copied to clipboard

RunService step connection is never disconnected, leading to memory leak when vide is required again in a new execution environment

Open TrippTrapp84 opened this issue 1 year ago • 3 comments

Culprit Code

This connection is never disconnected unless you manually setup a runservice connection and invoke Vide.step yourself. This would normally be fine in a live game but in environments like plugins (ui-labs is where I encountered this issue) this leads to the runservice connection never being cleaned and becoming a memory leak.

I'll be filing an issue with ui-labs to get this case fixed but it might be worth adding some way to destroy all the connections setup by a running vide instance.

TrippTrapp84 avatar Jan 11 '25 18:01 TrippTrapp84

Have you tried cleanup()?

That's not the issue, this event is never connected to a scope or any cleanup behavior outside of calling .step yourself, which should not be required because it forces plugins like ui-labs to call .step, which removes the ability for the sandboxed story environments to call .step themselves.

TrippTrapp84 avatar Feb 17 '25 23:02 TrippTrapp84