Skip to content

Commit aa1f53d

Browse files
authored
Merge pull request #144 from justinzhuguangwen/master
Update agent.cpp
2 parents a280fe2 + f1395bc commit aa1f53d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/agent/agent.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,14 @@ namespace behaviac {
163163
}
164164
}
165165
}
166-
166+
167+
for (behaviac::map<uint32_t, IValue*>::iterator it = _members.begin(); it != _members.end(); ++it)
168+
{
169+
if (it->second)
170+
{
171+
BEHAVIAC_DELETE(it->second);
172+
}
173+
}
167174
#endif
168175

169176
for (BehaviorTreeTasks_t::iterator it = this->m_behaviorTreeTasks.begin(); it != m_behaviorTreeTasks.end(); ++it) {
@@ -176,6 +183,7 @@ namespace behaviac {
176183

177184
if (this->m_variables != NULL) {
178185
this->m_variables->Clear(true);
186+
BEHAVIAC_DELETE(this->m_variables);
179187
}
180188
}
181189

0 commit comments

Comments
 (0)