mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3088: EntityManager::clear doesn't working with inserting #3832
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 @doctrinebot on GitHub (Apr 16, 2014).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user ach:
It looks like EntityManager's clear() method doesn't remove objects that was persisted during script execution.
Bellows are two functions. First one insert 10.000 records and use clear after each flush that should remove objects from memory, but instead of that memory usage growths in each iteration. There isn't any other reference for this objects.
I've checked how it works for reading and with clearing it works perfectly - script uses only constant memory.
@doctrinebot commented on GitHub (Apr 16, 2014):
Comment created by @ocramius:
Would be useful to see what the entity class looks like.
Additionally, the ORM version being affected is also needed.