function Signal.DisconnectAll(u)u._handlerListHead=false if u.connectionsChanged then u.connectionsChanged:Fire(-u.totalConnections)u.connectionsChanged:Destroy()u.connectionsChanged=nil u.totalConnections=0 end end Signal.Destroy=Signal.DisconnectAll Signal.destroy=Signal.DisconnectAll
-- Disconnect all handlers. Since we use a linked list it suffices to clear the
-- reference to the head handler.
function Signal:DisconnectAll()
	self._handlerListHead = false

	if self.connectionsChanged then
		self.connectionsChanged:Fire(-self.totalConnections)
		self.connectionsChanged:Destroy()
		self.connectionsChanged = nil
		self.totalConnections = 0
	end
end
Signal.Destroy = Signal.DisconnectAll
Signal.destroy = Signal.DisconnectAll
