Re: Changing font colors on the fly == memory leak!
| From: | Brian A. Stumm | Date: | Wed, 04 Jan 2006 01:21:23 +0000 |
| Subject: | Re: Changing font colors on the fly == memory leak! | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6500@lists.php.net to get a copy of this message | ||
On Tue, 3 Jan 2006, Steph Fox wrote:
> A userland free() wouldn't actually make any difference in a web
> environment - requests don't last long enough to need it. The problem only
> relates to long-running scripts, and that means clientside usage.
I disagree. I've done some work with webapps written in php that maintain
persistent socket connections in a webbrowser environment. A project
called phpUA. My hosting is being wonky or I'd link to my site but here is
a random user install I found by googling. This app is related to game
servers and showing what is going on in game in a topographical
representation using jscript animation and php.
http://www.tfcgaschamber.com/phpua/index.php?mode=watch&server=1
> Glad Brian got his leakage sorted out, but the problem of unfree'd memory
> remains for now and is beyond our control to fix. I read an interesting
> solution for long-running CLI scripts involving daemons with limited
> lifetimes, also on internals@ - can't find the thread right now, but I
> covered it in Zend summaries for week 257 (when I get around to putting that
> backlog live).
I'm thinking that one way to reduce memory usage might be to register your
timeout function to just exec another php script via CLI and return stuff
on stdout and work from there. Might help with memory issues. Just one
idea I toyed with today.