function Janitor.Clean(M)for N,Z in ipairs(M._objects)do M:_cleanupObject(Z[1],Z[2])end table.clear(M._objects)end function Janitor._cleanupObject(Z,M,N)if N==FN_MARKER then M()else M[N](M)end end

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

