Go to the source code of this file.
|
| template<> |
| void | dataLoad (std::istream &stream, std::map< dof_id_type, PenetrationInfo * > &m, void *context) |
| | We have to have a specialization for this map because the PenetrationInfo objects MUST get deleted before the ones are loaded from a file or it's a memory leak.
|
| |
◆ dataLoad()
template<>
| void dataLoad |
( |
std::istream & |
stream, |
|
|
std::map< dof_id_type, PenetrationInfo * > & |
m, |
|
|
void * |
context |
|
) |
| |
|
inline |
We have to have a specialization for this map because the PenetrationInfo objects MUST get deleted before the ones are loaded from a file or it's a memory leak.
Definition at line 115 of file PenetrationLocator.h.
116{
117 std::map<dof_id_type, PenetrationInfo *>::iterator it = m.begin();
118 std::map<dof_id_type, PenetrationInfo *>::iterator end = m.end();
119
120 for (; it != end; ++it)
121 delete it->second;
122
123 m.clear();
124
125
126 unsigned int size = 0;
127 stream.read((char *)&size, sizeof(size));
128
129 for (unsigned int i = 0; i < size; i++)
130 {
134 }
135}
void loadHelper(std::istream &stream, P &data, void *context)
Scalar helper routine.