php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56652 __destruct of a class that extends ffi not called
Submitted: 2005-11-15 06:58 UTC Modified: 2017-04-01 20:08 UTC
From: ken at nightmail dot ru Assigned:
Status: Wont fix Package: ffi (PECL)
PHP Version: Irrelevant OS: windows xp sp2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ken at nightmail dot ru
New email:
PHP Version: OS:

 

 [2005-11-15 06:58 UTC] ken at nightmail dot ru
Description:
------------
Used PHP v5.0.5
When you create a class by extending ffi and add a
destructor to it, it doesn't get called when the object gets out of scope.

Reproduce code:
---------------
<?

class test extends ffi
{
    function __construct( $param ){ parent::__construct($param); echo
"born\n"; }
    function __destruct() { parent::__destruct(); echo "died\n"; }
}

$test = new test;
unset($test);

?>

Expected result:
----------------
born
died

Actual result:
--------------
born

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-15 07:09 UTC] pierre dot php at gmail dot com
As a note, some exts have been fixed in cvs. But I was not sure if the fix is correct or not. Tony will check a 2nd time with Dmitri whether NULL means "the default destruct" or no desctruct.
 [2005-11-15 07:14 UTC] tony2001 at phpclub dot net
Wez, please check out the patch:
http://tony2001.phpclub.net/dev/tmp/ffi_destruct.diff
 [2013-12-13 07:52 UTC] wez@php.net
-Status: Assigned +Status: Open -Assigned To: wez +Assigned To:
 [2017-04-01 20:08 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 20:08 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2004, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 09 19:01:26 2024 UTC