* @brief Get the value for a given key and remove it from the map, without destroying it * @param key * @retval V* * @note The returned object must be freed by the caller when no longer required */
| 277 | * @note The returned object must be freed by the caller when no longer required |
| 278 | */ |
| 279 | V* extract(const K& key) |
| 280 | { |
| 281 | int i = indexOf(key); |
| 282 | return (i < 0) ? nullptr : extractAt(i); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * @brief Get the value at a given index and remove it from the map, without destroying it |