Blender V4.3
cycles/util/map.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifndef __UTIL_MAP_H__
6#define __UTIL_MAP_H__
7
8#include <map>
9#include <unordered_map>
10
12
13using std::map;
14using std::pair;
15using std::unordered_map;
16using std::unordered_multimap;
17
18template<typename T> static void map_free_memory(T &data)
19{
20 /* Use swap() trick to actually free all internal memory. */
21 T empty_data;
22 data.swap(empty_data);
23}
24
26
27#endif /* __UTIL_MAP_H__ */
static void map_free_memory(T &data)
#define CCL_NAMESPACE_END