Signal: Destroy Synchronous
KawaiiSignal:DestroyPsmSignal:DestroyVoltSignal:Destroy
Destroy this custom signal and disconnect its registered listeners. Use it when the component that owns the signal is finished. Release the signal and its connections instead of keeping a discarded UI subscribed indefinitely.
Luau
Signal:Destroy() -> ()Parameters
Call this method with a Signal receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
This function takes no arguments.
Returns
()This function returns no values.
Example
Luau
local changed = Signal.new()
local listener = changed:Connect(function() print("Changed") end)
changed:Destroy()
print(listener.Connected) -- false
-- Create a new Signal if you need another event later.