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
-------
15a8610c0c
[Cache] Avoid memory leak in TraceableAdapter::reset()
This commit is contained in:
commit
17bbaa502a
@ -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()
|
||||
|
Reference in New Issue
Block a user