Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7629 - scheduledForSynchronization leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") #7632

Merged
merged 2 commits into from
Mar 2, 2019

Conversation

yethee
Copy link
Contributor

@yethee yethee commented Mar 1, 2019

Test to demonstrate unexpected behavior, related to issue #7629

@Ocramius Ocramius changed the title Failing tests for #7926 Failing tests for #7926 - scheduledForSynchronization leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") Mar 1, 2019
@Ocramius Ocramius added the Bug label Mar 1, 2019
@Ocramius
Copy link
Member

Ocramius commented Mar 1, 2019

So, I think that on master we need to take this bit and isolate it to a private method to be called also in case of a clean UnitOfWork:

// Clean up
$this->entityInsertions =
$this->entityUpdates =
$this->entityDeletions =
$this->extraUpdates =
$this->entityChangeSets =
$this->collectionUpdates =
$this->collectionDeletions =
$this->visitedCollections =
$this->scheduledForSynchronization =
$this->orphanRemovals = [];

lib/Doctrine/ORM/UnitOfWork.php Outdated Show resolved Hide resolved
@yethee yethee force-pushed the tests-for-gh-7629 branch from ead0cde to 4db4432 Compare March 2, 2019 11:52
@yethee yethee force-pushed the tests-for-gh-7629 branch from 4db4432 to 2167536 Compare March 2, 2019 12:02
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yethee!

@Ocramius Ocramius added this to the 3.0 milestone Mar 2, 2019
@Ocramius Ocramius self-assigned this Mar 2, 2019
@Ocramius Ocramius merged commit d8f6710 into doctrine:master Mar 2, 2019
@Ocramius Ocramius changed the title Failing tests for #7926 - scheduledForSynchronization leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") Fix #7926 - scheduledForSynchronization leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") Mar 2, 2019
@yethee yethee deleted the tests-for-gh-7629 branch March 2, 2019 18:19
@yethee yethee changed the title Fix #7926 - scheduledForSynchronization leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") Fix #7629 - scheduledForSynchronization leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED_EXPLICIT") Mar 2, 2019
@greg0ire greg0ire removed this from the 3.0.0 milestone Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants