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

function Registry:remove(key)
	local object = self.objects[key]
	if object then
		object:destroy()
	end
	self.objects[key] = nil
end
