[Xapian-devel] PHP Latest

Olly Betts olly at survex.com
Thu Apr 20 16:17:00 BST 2006


On Thu, Apr 20, 2006 at 05:11:14PM +0200, Daniel M?nard wrote:
> BTW, you remember me a problem I had with my wrapper and that I have not 
> investigated : I had to explicitely release the object (php should do it 
> automatically). For example, with a WritableDatabase, the lock file was not 
> removed if I didn't write "$db=null".

For the wrapper class, or for the resource thing that you pass to the
flat API?

I believe SWIG sets a destructor to run on the resource, but I guess PHP
doesn't call it (I notice simpleindex.php explicitly sets the database
to Null).

> I will have to test the new wrapper to check that we don't have a similar 
> problem.

If it doesn't, we can easily generate a destructor to explicitly set the
swig_ptr to Null.  Assuming PHP always runs object destructors which
I'd really hope it does...

Cheers,
    Olly



More information about the Xapian-devel mailing list