[Cache] Avoid memory leak in TraceableAdapter::reset()

This commit is contained in:
Grégoire Pineau 2020-04-15 20:00:38 +02:00
parent 932a4f86ed
commit 15a8610c0c

View File

@ -191,15 +191,11 @@ class TraceableAdapter implements AdapterInterface, PruneableInterface, Resettab
*/
public function reset()
{
if (!$this->pool instanceof ResettableInterface) {
return;
}
$event = $this->start(__FUNCTION__);
try {
if ($this->pool instanceof ResettableInterface) {
$this->pool->reset();
} finally {
$event->end = microtime(true);
}
$this->clearCalls();
}
public function getCalls()