Re: [PHP-DEV] zend_list_delete() doesn't.

2005-09-08 Thread Andi Gutmans
At 07:56 AM 9/8/2005, Stanislav Malyshev wrote: WF>>IMO, "hard kill" doesn't really fit in a system that uses reference WF>>counts; you either use reference counts, or don't. There are cases Obviously, we have here conflicting requirements - on the one side, fclose($a) should invalidate resours

Re: [PHP-DEV] zend_list_delete() doesn't.

2005-09-08 Thread Stanislav Malyshev
WF>>IMO, "hard kill" doesn't really fit in a system that uses reference WF>>counts; you either use reference counts, or don't. There are cases Obviously, we have here conflicting requirements - on the one side, fclose($a) should invalidate resourse, on the other side, oci_close($a) should not.

Re: [PHP-DEV] zend_list_delete() doesn't.

2005-09-08 Thread Sara Golemon
Stanislav Malyshev Wrote SG>>> $fp1 = fopen('test', 'w'); SG>> $fp2 = $fp1; /* Still a single zval* and le->refcount == 1 */ SG>> $fp3 = &$fp1; /* Two zval*s now and le->refcount == 2 */ SG>> SG>> fclose($fp1); I think this was discussed before, though I may be mistaken. The problem here is that

Re: [PHP-DEV] zend_list_delete() doesn't.

2005-09-08 Thread Wez Furlong
On 9/8/05, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > SG>> SG>> $fp1 = fopen('test', 'w'); > SG>> $fp2 = $fp1; /* Still a single zval* and le->refcount == 1 */ > SG>> $fp3 = &$fp1; /* Two zval*s now and le->refcount == 2 */ > SG>> > SG>> fclose($fp1); > > I think this was discussed before, th

Re: [PHP-DEV] zend_list_delete() doesn't.

2005-09-08 Thread Stanislav Malyshev
SG>>> $fp1 = fopen('test', 'w'); SG>> $fp2 = $fp1; /* Still a single zval* and le->refcount == 1 */ SG>> $fp3 = &$fp1; /* Two zval*s now and le->refcount == 2 */ SG>> SG>> fclose($fp1); I think this was discussed before, though I may be mistaken. The problem here is that you expect fclose to kill

[PHP-DEV] zend_list_delete() doesn't.

2005-09-07 Thread Sara Golemon
Certain things you take for granted: The sun will come up. Politicians are dishonest. Resource destruction functions (fclose(), mysql_disconnect(), etc...) will actually shutdown their resources. Guess which of those three you can't count on. Seems that zend_list_delete(), which I (and many ot

Re: [PHP-DEV] zend_list_delete

2005-03-24 Thread Sara Golemon
> > 1 ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); > > 2 zend_list_delete(Z_LVAL_P(z_ftp)) > > 3 efree(ftp) > > Line three is wrong it should be > zval_ptr_dtor(&z_ftp) > and no, it doesn't make the efree()/zval_ptr_dtor() redundant. > It only frees the members but do

Re: [PHP-DEV] zend_list_delete

2005-03-24 Thread Marcus Boerger
Hello Jesse, Thursday, March 24, 2005, 3:44:18 PM, you wrote: > does zend_list_delete free the resource making lines 2 & 3 redundent? > 1 ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); > 2 zend_list_delete(Z_LVAL_P(z_ftp)) > 3 efree(ftp) Line three is wrong it shou

[PHP-DEV] zend_list_delete

2005-03-24 Thread Jesse Binam
does zend_list_delete free the resource making lines 2 & 3 redundent? 1 ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf); 2 zend_list_delete(Z_LVAL_P(z_ftp)) 3 efree(ftp) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/u