#44175 [Opn->Bgs]: unable to unset reference
| From: | derick@php.net | Date: | Tue, 19 Feb 2008 18:15:47 +0000 |
| Subject: | #44175 [Opn->Bgs]: unable to unset reference | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122474@lists.php.net to get a copy of this message | ||
ID: 44175
Updated by: derick@php.net
Reported By: absynthe dot is at free dot fr
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: linux
PHP Version: 5.2.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2008-02-19 18:12:52] absynthe dot is at free dot fr
Description:
------------
Hello,
First of all I would like to know if one day we will be able to unset
$this into a class in order to destroy the object. It could really be
useful to prevent big memory usage.
As it can't be done I tried to unset an object by unsetting a reference
of this object but it has no effect on the object but only on the
reference.
Should unset destroy the reference itself and the object ???
if you don't think so can you think of something different to destroy
both of them like I don't know, destroy($obejctsreference)
Regards.
Reproduce code:
---------------
<?
$x = new stdClass();
$x->a = 'ayayaye';
$b[0] =& $x;
unset($b[0]);
var_dump($x);
?>
Expected result:
----------------
NULL
Actual result:
--------------
object(stdClass)#1 (1) {
["a"]=>
string(7) "ayayaye"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44175&edit=1