Re: [PHP-DEV] Freeing memory

2002-11-09 Thread Tony Leake
Hi Wez, I wrote a pecl extension called ecasound which interacts with an audio processing library. Now the way that ecasound is written will change in future versions and will have a fully interactive mode, all other implementations (perl, python c++ etc) have been re-written so that they open up

Re: [PHP-DEV] Freeing memory

2002-11-09 Thread Wez Furlong
Hi Tony, What kind of things are you planning to do? proc_open seems ideal to extend for this purpose, and works on win32. --Wez. On 09/11/02, "Tony Leake" <[EMAIL PROTECTED]> wrote: > The whole picture is that i want to control a child process completely > from within php. A bit like popen or

Re: [PHP-DEV] Freeing memory

2002-11-09 Thread Tony Leake
The whole picture is that i want to control a child process completely from within php. A bit like popen or proc_open but with 2 independent pipes to the child's stdin and stdout that I can read and write to. So I'm basically wrapping the c functions pipe(), dup2() and friends. Once I have it all

Re: [PHP-DEV] Freeing memory

2002-11-09 Thread Andi Gutmans
Actually zval_ptr_dtor() is probably more suitable. In any case, is this zval something you keep locally in your extension or are you returning/adding it to the engine's symbol table? If so, the engine should take care of the memory automatically as long as you've done everything correctly. Mayb

Re: [PHP-DEV] Freeing memory

2002-11-09 Thread Rasmus Lerdorf
Yup, you will need to FREE_ZVAL() it On 9 Nov 2002, Tony Leake wrote: > > Hi, > > I am getting the following output from a php script that calls an > extension I am writing (I have compiled the extension with > --enable-debug) > > > /home/phpcvs/php4_head/ext/pipe/pipe.c(245) : Freeing 0x0822568

[PHP-DEV] Freeing memory

2002-11-09 Thread Tony Leake
Hi, I am getting the following output from a php script that calls an extension I am writing (I have compiled the extension with --enable-debug) /home/phpcvs/php4_head/ext/pipe/pipe.c(245) : Freeing 0x0822568C (12 bytes), script=test.php /home/phpcvs/php4_head/ext/pipe/pipe.c(244) : Freeing 0