-
Notifications
You must be signed in to change notification settings - Fork 215
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe your environment
PHP 8.2.28, but this bug should not relevant with PHP version.
Steps to reproduce
After detached ContextStorageNode, it will reference itself as the previous node:
if ($this === $this->head->node) {
assert($this->previous !== $this);
$this->head->node = $this->previous;
$this->previous = $this;
return $flags;
}Which cause circular reference to holding the memory.
What is the expected behavior?
Use WeakReference to avoid it.
if ($this === $this->head->node) {
assert($this->previous !== $this);
$this->head->node = $this->previous;
$this->previous = WeakReference::create($this);
return $flags;
}What is the actual behavior?
Causing memory leak if we holding the process longer.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working