mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Memory leak only on HYDRATE_SINGLE_SCALAR #6256
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 @ZhukV on GitHub (Jun 19, 2019).
Originally assigned to: @ZhukV on GitHub.
Bug Report
Summary
Memory leak only on
AbstractQuery::HYDRATE_SINGLE_SCALAR.Current behavior
If we use
AbstractQuery::HYDRATE_SINGLE_SCALARwe have a memory leak in application. But if we use other hydrations, then all OK.How to reproduce
Code snippet for reproduce:
Expected behavior
If we use the
HYDRATE_SCALAR, then all OK. Memory is not leak. Sample output:But, if you change the
$hydrationModetoHYDRATE_SINGLE_SCALARwe have a memory leak. Output:But, this situations have other difficulties:
->andWhere('t.externalId = '.\random_int(0, PHP_INT_MAX))application is failed with memory leak.Note:
@lcobucci commented on GitHub (Oct 2, 2019):
@ZhukV would you please try to reproduce this without any external code, preferably sending us a PR with a functional test case? That would amazing and help us in solving this issue 👍
@lcobucci commented on GitHub (Oct 2, 2019):
Possible duplicate of https://github.com/doctrine/orm/issues/7649
@flaushi commented on GitHub (May 6, 2021):
Whats your backend? Postgresql?
@programmador commented on GitHub (May 17, 2021):
As far as I remember @ZhukV encountered the problem while using MySQL.