```\nfor (uint i = 0; i < contractKeys.length; i++) {\n    // Delete the key from the array + mapping if it is present\n    if (contractKeys[i] == name) {\n        delete registry[contractKeys[i]];\n        contractKeys[i] = contractKeys[contractKeys.length - 1];\n        delete contractKeys[contractKeys.length - 1];\n        contractKeys.length--;\n```\n