function Trove.Clean(N)for u,v in ipairs(N._objects)do N:_cleanupObject(v[1],v[2])end table.clear(N._objects)end function Trove._cleanupObject(v,N,u)if u==FN_MARKER then N()elseif u==THREAD_MARKER then coroutine.close(N)else N[u](N)end end

function Trove:Clean()
	for _,obj in ipairs(self._objects) do
		self:_cleanupObject(obj[1], obj[2])
	end
	table.clear(self._objects)
end


function Trove:_cleanupObject(object, cleanupMethod)
	if cleanupMethod == FN_MARKER then
		object()
	elseif cleanupMethod == THREAD_MARKER then
		coroutine.close(object)
	else
		object[cleanupMethod](object)
	end
end

