RBXSignal Garbage Collected

If you save to signal to an object but destroy the object, does the signal still get GC’d?

For example;

local signal = obj.AncestryChanged:connect(function(child, parent)
end)

--some time later
obj:Destroy()

The connection does get disconnected. But you still have a reference to the connection object itself. However when the scope the local is declared in ends there won’t be any more references to the connection so it can get gc’d

1 Like

Yes it will get disconnected and GC’ed, also, that is called a connection and not a signal.

1 Like