--[[
    Calls destroy() on the given object and removes it from the registry
]]

function Registry:removeObject(object)
	for key, _object in pairs(self.objects) do
		if object == _object then
			self:remove(key)
			return
		end
	end
end
