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

Function smem_close

Core/SoarKernel/src/semantic_memory.cpp:3319–3337  ·  view source on GitHub ↗

performs cleanup operations when the database needs to be closed (end soar, manual close, etc)

Source from the content-addressed store, hash-verified

3317
3318// performs cleanup operations when the database needs to be closed (end soar, manual close, etc)
3319void smem_close(agent* thisAgent)
3320{
3321 if (thisAgent->smem_db->get_status() == soar_module::connected)
3322 {
3323 _smem_close_vars(thisAgent);
3324
3325 // if lazy, commit
3326 if (thisAgent->smem_params->lazy_commit->get_value() == on)
3327 {
3328 thisAgent->smem_stmts->commit->execute(soar_module::op_reinit);
3329 }
3330
3331 // de-allocate common statements
3332 delete thisAgent->smem_stmts;
3333
3334 // close the database
3335 thisAgent->smem_db->disconnect();
3336 }
3337}
3338
3339void smem_reinit_cmd(agent* thisAgent)
3340{

Callers 3

smem_reinit_cmdFunction · 0.85
smem_reinitFunction · 0.85
destroy_soar_agentFunction · 0.85

Calls 5

_smem_close_varsFunction · 0.85
get_statusMethod · 0.80
get_valueMethod · 0.45
executeMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected