Help! Destroying an empty script causes memory leaks

I created a simple GUI to clone and destroy scripts.

empty script:
i2

spawnScript:
spawnscript

clearScript:
clearscript

Can anyone tell me why this happens?

this behavior keeps repeating

how can I solve that?

Maybe you should report this in #platform-feedback:engine-bugs?

1 Like

This also happens everywhere else where localscripts can be ran, including PlayerScripts and the character, which is interesting. The fact that some of the memory (which is a small margin) remains even after clearing all scripts does show that it kind of does leak memory. As such, this should be reported in #platform-feedback:engine-bugs.

1 Like