8000 bug #36460 [Cache] Avoid memory leak in TraceableAdapter::reset() (ly… · symfony/symfony@17bbaa5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17bbaa5

Browse files
committed
bug #36460 [Cache] Avoid memory leak in TraceableAdapter::reset() (lyrixx)
This PR was merged into the 3.4 branch. Discussion ---------- [Cache] Avoid memory leak in TraceableAdapter::reset() | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | When we call `ServicesResetter::reset()`, we want to reset the application to its initial states. We don't want a memory leak :p Commits ------- 15a8610 [Cache] Avoid memory leak in TraceableAdapter::reset()
2 parents f702863 + 15a8610 commit 17bbaa5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Symfony/Component/Cache/Adapter/TraceableAdapter.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,11 @@ public function prune()
191191
*/
192192
public function reset()
193193
{
194-
if (!$this->pool instanceof ResettableInterface) {
195-
return;
196-
}
197-
$event = $this->start(__FUNCTION__);
198-
try {
194+
if ($this->pool instanceof ResettableInterface) {
199195
$this->pool->reset();
200-
} finally {
201-
$event->end = microtime(true);
202196
}
197+
198+
$this->clearCalls();
203199
}
204200

205201
public function getCalls()

0 commit comments

Comments
 (0)
0