handle variable destroyed by garbage collector.
This commit is contained in:
parent
56d71e55b4
commit
b1a3b925ae
@ -195,8 +195,11 @@ runSolver (void)
|
||||
const ParamSet& beliefs = results[i];
|
||||
YAP_Term queryBeliefsL = YAP_TermNil();
|
||||
for (int j = beliefs.size() - 1; j >= 0; j--) {
|
||||
YAP_Int sl1 = YAP_InitSlot(list);
|
||||
YAP_Term belief = YAP_MkFloatTerm (beliefs[j]);
|
||||
queryBeliefsL = YAP_MkPairTerm (belief, queryBeliefsL);
|
||||
list = YAP_GetFromSlot(sl1);
|
||||
YAP_RecoverSlots(1);
|
||||
}
|
||||
list = YAP_MkPairTerm (queryBeliefsL, list);
|
||||
}
|
||||
|
Reference in New Issue
Block a user