mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Fix memory leak in AbstractHydrator - Follow up #6630
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @olsavmic on GitHub (Feb 17, 2021).
I have encountered an issue with a memory leak in SingleScalarHydrator.
AbstractHydrator::hydrateAll()method does not take into account the possibility of an exception being thrown so whenSingleScalarHydrator::hydrateAllDatathrowsNoResultException/NonUniqueResultException, the event listener foronClear eventis not removed and the hydrator is stuck in the memory.It's been solved here once but not merged due to missing test cases.
Original issue: Fix memory leak in AbstractHydrator
I'll try to provide a fix and appropriate test case for this issue so it can be finally merged.