Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Form] Memory leak in EntityType when using phppm #23975

Copy link
Copy link
Closed
@zmitic

Description

@zmitic
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? yes
Symfony version 3.3.5

I am playing around with phppm and found memory leak in EntityType::class. This ticket on phppm repository explains the problem in details.

In short, EntityType caches results in local property so same query will not be executed more than once. Given that I do $em->clear() in kernel.terminate event (otherwise, identity map would quickly fill up), I get exception on next request when submitting the same form.

I am reporting this as bug and not a feature request because I saw other tickets about memory leaks being reported the same.


This might sound funny but what if a service is tagged with for example memory_clean, it would need to implement MemoryCleanInterface with only clean() method.

And on kernel.terminate event, this method would be called on all these services. It could be done with a simple listener but this would bring consistency for future bundles when local caching is needed.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.