Browse Source

efree resource memory

Stefan Siegl 10 năm trước cách đây
mục cha
commit
7d13c75073
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      v8js.cc

+ 2 - 1
v8js.cc

@@ -1339,7 +1339,7 @@ static PHP_METHOD(V8Js, executeString)
 	}
 	}
 	php_v8js_execute_script(getThis(), res, flags, time_limit, memory_limit, &return_value TSRMLS_CC);
 	php_v8js_execute_script(getThis(), res, flags, time_limit, memory_limit, &return_value TSRMLS_CC);
 	php_v8js_script_free(res, true);
 	php_v8js_script_free(res, true);
-
+	efree(res);
 }
 }
 /* }}} */
 /* }}} */
 
 
@@ -1405,6 +1405,7 @@ static PHP_METHOD(V8Js, checkString)
 	}
 	}
 
 
 	php_v8js_script_free(res, true);
 	php_v8js_script_free(res, true);
+	efree(res);
 	RETURN_TRUE;
 	RETURN_TRUE;
 }
 }
 /* }}} */
 /* }}} */