MCPcopy Create free account
hub / github.com/SoarGroup/Soar / ~AgentSML

Method ~AgentSML

Core/KernelSML/src/sml_AgentSML.cpp:101–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101AgentSML::~AgentSML()
102{
103 ResetCaptureReplay();
104
105 // Register for the new INPUT_WME_GARBAGE_COLLECTED_CALLBACK
106 // Base the id on the address of this object which ensures it's unique
107 std::ostringstream callbackId;
108 callbackId << "id_0x" << this << "_evt_" << INPUT_WME_GARBAGE_COLLECTED_CALLBACK;
109 soar_remove_callback(GetSoarAgent(), INPUT_WME_GARBAGE_COLLECTED_CALLBACK, callbackId.str().c_str()) ;
110
111 delete m_pAgentRunCallback ;
112
113 /* RPM 9/06 added code from reinitialize_soar to clean up stuff hanging from last run
114 need to put it here instead of in destroy_soar_agent because gSKI is
115 cleaning up too much stuff and thus it will crash if called later */
116 clear_goal_stack(m_agent);
117 m_agent->active_level = 0; /* Signal that everything should be retracted */
118 m_agent->FIRING_TYPE = IE_PRODS;
119 do_preference_phase(m_agent); /* allow all i-instantiations to retract */
120
121 destroy_soar_agent(m_agent);
122}
123
124// Release any objects or other data we are keeping. We do this just
125// prior to deleting AgentSML, but before the underlying gSKI agent has been deleted

Callers

nothing calls this directly

Calls 5

soar_remove_callbackFunction · 0.85
GetSoarAgentFunction · 0.85
clear_goal_stackFunction · 0.85
do_preference_phaseFunction · 0.85
destroy_soar_agentFunction · 0.85

Tested by

no test coverage detected