--[=[
	@param object any -- Object to remove
	Removes the object from the Trove and cleans it up.
	```lua
	local part = Instance.new("Part")
	trove:Add(part)
	trove:Remove(part)
	```
]=]

function Trove:Remove(object: any): boolean
	local objects = self._objects
	for i,obj in ipairs(objects) do
		if obj[1] == object then
			local n = #objects
			objects[i] = objects[n]
			objects[n] = nil
			self:_cleanupObject(obj[1], obj[2])
			return true
		end
	end
	return false
end

