From:             [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:      4.0.4pl1
PHP Bug Type:     Performance problem
Bug description:  Memory leaks attributable to OO PHP

I wrote two scripts to compare the difference in performance between simple script and 
one written in OO with classes and required libraries. Both scripts accessed the SQL 
database using ADODB connection. I used Microsoft Web Application Stress Tool, which 
seems to be very useful.
The "simple" version yielded better performance in less CPU usage (and no memory 
leaking), whereas the OO version maxed out the CPU usage 100%, as well as slowly but 
surely leaking memory.
I tried using the unset() function in several places in the code, but this did not 
help much, as the script was still leaking memory during the tests.

Using unset() to unset the COM object helped a lot, as PHP did not seem able to free 
the memory by itself.

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to