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

Memory leak on $array+=array() #4498

Closed
imsamurai opened this issue Dec 19, 2014 · 3 comments
Closed

Memory leak on $array+=array() #4498

imsamurai opened this issue Dec 19, 2014 · 3 comments

Comments

@imsamurai
Copy link

Here is a simplified test http://3v4l.org/64TZi

@Pomyk
Copy link
Contributor

Pomyk commented Dec 19, 2014

Looks like it doesn't leak if you put it in a function.
Another workaround: $res = $res + array();

@paulbiss
Copy link
Contributor

The bug in "+=" was fixed in #3740 though your test case still shows the leak because you're also computing memory consumed jitting the pseudomain, if you memory_get_usage(false) you'll see that the request memory usage is flat (you can also run with the jit off to see the same thing).

@imsamurai
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants