Re: problems compiling new PECL module

From: Date: Tue, 11 Jan 2011 14:28:59 +0000
Subject: Re: problems compiling new PECL module
References: 1 2 3 4 5 6 7 8 9  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7937@lists.php.net to get a copy of this message
On Mon, 10 Jan 2011 23:22:03 -0000, Tim Gustafson <tjg@tgustafson.com> wrote:
* In PHP method Noise_Abs::GetSourceModule, you call the native GetSourceModule and create a new PHP object of type Noise_Const from the native result. Therefore, the new object will be !== from the original object.
However, even though its !== to the original object, it still references the native C++ object. So, wouldn't that cause the C++ object to be double-freed during shutdown?
Yes, that may indeed a problem. If you go that road, you may have to duplicate the object (if possible...) or implement some kind of reference counting mechanism. So it may be best to go with the other option. -- Gustavo Lopes

« previous php.pecl.dev (#7937) next »