Does Instance with no parent get garbage collected?

Hello!

I found a module for tweening and it does something like this:

local event = Instance.new("BindableEvent")

-- Code ends

What I’m wondering is if the event is never parented and the script stops running, will it cause a memory leak?

2 Likes

If I’m not wrong, any instance without a strong reference and parent will be garbage collected. Since the script stops running it should be garbage collected

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.