Skip to content
Snippets Groups Projects

dev_178030 wip : fix memory leak on php7.4 : trace memory

Merged Ghislain Loas requested to merge split_testsuites into master
Files
9
@@ -172,6 +172,24 @@ abstract class AbstractControllerTestCase extends Zend_Test_PHPUnit_ControllerTe
}
protected function _printMemory() : void {
$memory_usage = round((memory_get_usage() / (1024*1024)), 0);
$memory_limit = round(((int) ini_get('memory_limit') ), 0);
echo printf("%s / %s\n",
$memory_usage,
$memory_limit);
}
protected function _cleanMemory() {
foreach ((new \ReflectionObject($this))->getProperties() as $prop) {
if ($prop->isStatic() || strpos($prop->getDeclaringClass()->getName(), 'PHPUnit') === 0)
continue;
unset($this->{$prop->getName()});
}
}
public function tearDown() {
new TearDown($this->_storm_default_to_volatile,
$this->_registry_sql,