|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-09-19 15:51 UTC] felipe@php.net
[2008-09-22 06:50 UTC] lorenzo dot reffo at gmail dot com
[2008-09-27 01:00 UTC] php-bugs at lists dot php dot net
[2008-10-18 18:09 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 06:00:02 2025 UTC |
Description: ------------ I encountered an error while assigning multiple class to an object into another class. Suppose to have a class A in which is defined a property. At the begin, I use the property as an instance of another class B, then I do an 'unset' of property before creating assigning it an instance of class C. Reproduce code: --------------- class B { # do something } class C { # do something } class A { private $_prop; function __construct() { $this->_prop = new B(); } function Re () { unset($this->_prop); $this->_prop = new C(); } } $h = new A() $h->Re(); unset($h); Expected result: ---------------- I expect it to work correctly (I read a post before where staff said it has been fixed in version 5.2.x). Actual result: -------------- it crashes when calling 'Re' method giving me an error: Allowed memory size of ... bytes exhausted etc.