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
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.
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
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
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
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
> > 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
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
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