Enable garbage collector for Program class. This also partially fixes #47, as from now Program::__destruct() will be called automatically.
All checks were successful
The build was successful.

This commit is contained in:
Rafal Kupiec 2019-03-19 12:52:36 +01:00
부모 b60c1de4cf
커밋 3d23d43040
로그인 계정: belliash
GPG 키 ID: 4E829243E0CFE6B4

파일 보기

@ -5472,6 +5472,8 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
if(pInstance == 0) {
PH7_VmMemoryError(&(*pVm));
}
/* Enable garbage collector */
pInstance->iRef--;
/* Check if a constructor is available */
pMethod = PH7_ClassExtractMethod(pClass, "__construct", sizeof("__construct") - 1);
if(pMethod) {