Summary: | PHP leaks memory if using reference | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Honza <hkmaly> |
Component: | Current packages | Assignee: | PHP Bugs <php-bugs> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Code which eat all available memory ... but shouldn't.
Updated leak code |
Description
Honza
2004-09-10 09:00:28 UTC
Created attachment 39323 [details]
Code which eat all available memory ... but shouldn't.
Submited also as http://bugs.php.net/30053 ... closing as wontfix as per upstream. Ok. So they didn't fix it, because they didn't want to rewrite whole garbage collecting and half of Zend ... but it's still BUG. And another one is that big red warning, which is missing on the beginning of Chapter 19. References Explained. Just a follow-up comment ... Of course that code will eat all available memory. Unless you call unset() explicitly, the PHP garbage collector is only guaranteed to run when your script terminates. PHP is a scripting engine, and not a threaded virtual machine. Best regards, Stu Created attachment 39700 [details]
Updated leak code
Few unset added ...
I've assumed that unability to allocate new structure is a good reason to run gc ... but OK, I add code to unset all variables, even local one ... and suprise, nothing changed. On what other should I call unset ? |