MCPcopy Create free account
hub / github.com/SoarGroup/Soar / clear_CDPS

Function clear_CDPS

Core/SoarKernel/src/tempmem.cpp:187–205  ·  view source on GitHub ↗

MMA 8-2012: Clear out and deallocate the CDPS. */

Source from the content-addressed store, hash-verified

185
186/* MMA 8-2012: Clear out and deallocate the CDPS. */
187void clear_CDPS(agent* thisAgent, slot* s)
188{
189
190 list* cond_current, *cond_old;
191 preference* pref;
192
193 /* The CDPS should never exist on a top-level slot, so we do
194 * not need to worry about checking for DO_TOP_LEVEL_REF_CTS. */
195
196 cond_old = cond_current = s->CDPS;
197 s->CDPS = NIL;
198 for (; cond_current != NIL; cond_current = cond_current->rest)
199 {
200 pref = static_cast<preference*>(cond_current->first);
201 preference_remove_ref(thisAgent, pref);
202 }
203 free_list(thisAgent, cond_old);
204
205}
206/* MMA 8-2012 end */
207
208void remove_garbage_slots(agent* thisAgent)

Callers 2

remove_garbage_slotsFunction · 0.85
run_preference_semanticsFunction · 0.85

Calls 2

preference_remove_refFunction · 0.85
free_listFunction · 0.85

Tested by

no test coverage detected