Closed romainneutron closed 11 years ago
FYI, to know if PHP is compiled with the debug flag, just run php -v
, the debug flag is noted as follows :
PHP 5.4.10 (cli) (built: Dec 26 2012 12:18:20) (DEBUG)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
Just to keep track of my guess explained on IRC, I think the bug lies in phpiredis_reader_destroy()
in which we should free up the memory allocated for the two reader callbacks but instead we only destroy the underlying hiredis reader resource.
I'll try fixing this one ASAP, thanks!
@romainneutron alright it wasn't exactly what I expected but I fixed those leaks anyway, I pushed a fix in the fix-memoryleak-gh10
branch. I tested it with PHP 5.3 and PHP 5.4 and I don't get warnings anymore, can you double check that everything works for you?
PS: btw the repository has been transferred so if you don't want to clone it again from scratch you should point to the new URL using git remote set-url
.
I confirm that the issue is solved with your branch :rainbow:
Awesome, merged into master
. Thanks!
Hello,
When running the following script with PHP compiled with the debug option (for example by installing it with
brew install php54 --enable-debug
), I got a memory leak detection by zend engine :outputs :