function Janitor.Clean(X)for N,K in ipairs(X._objects)do X:_cleanupObject(K[1],K[2])end table.clear(X._objects)end function Janitor._cleanupObject(K,X,N)if N==FN_MARKER then X()else X[N](X)end end
--[=[
	Cleans up all objects in the Janitor. This is
	similar to calling `Remove` on each object
	within the Janitor.
]=]
function Janitor:Clean()
	for _, obj in ipairs(self._objects) do
		self:_cleanupObject(obj[1], obj[2])
	end
	table.clear(self._objects)
end

function Janitor:_cleanupObject(object, cleanupMethod)
	if cleanupMethod == FN_MARKER then
		object()
	else
		object[cleanupMethod](object)
	end
end
