Browse Source

Release all elements in object allocation table.

tags/v0.1.0
Rafal Kupiec 1 year ago
parent
commit
171456beb4
Signed by: belliash <belliash@codingworkshop.eu.org> GPG Key ID: 4E829243E0CFE6B4
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      engine/vm.c

+ 5
- 1
engine/vm.c View File

@@ -5056,7 +5056,7 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
ph7_class *pClass;
ph7_class_instance *pInstance;
ph7_class_method *pMethod;
ph7_value *pArgs, *sArgv;
ph7_value *pArgs, *sArgv, *pObj;
ph7_value pResult;
char *zDup;
const char *zStr, *zParam;
@@ -5122,6 +5122,10 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
pVm->iExitStatus = 0;
}
}
/* Garbage collector over all elements in object allocation table */
while(SySetGetNextEntry(&pVm->aMemObj, (void **)&pObj) == SXRET_OK) {
PH7_MemObjRelease(pObj);
}
/* Invoke any shutdown callbacks */
VmInvokeShutdownCallbacks(&(*pVm));
/*


Loading…
Cancel
Save