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