Skip to content

Commit

Permalink
[Cache] Avoid memory leak in TraceableAdapter::reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Apr 15, 2020
1 parent 932a4f8 commit 15a8610
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Symfony/Component/Cache/Adapter/TraceableAdapter.php
Expand Up @@ -191,15 +191,11 @@ public function prune()
*/
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()
Expand Down

0 comments on commit 15a8610

Please sign in to comment.