Bug #63726 [Asn]: Memleak with static properties and internal/user classes

From: Date: Mon, 10 Dec 2012 02:39:16 +0000
Subject: Bug #63726 [Asn]: Memleak with static properties and internal/user classes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-175252@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63726&edit=1

 ID:                 63726
 Updated by:         laruence@php.net
 Reported by:        mike@php.net
 Summary:            Memleak with static properties and internal/user
                     classes
 Status:             Assigned
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Arch Linux
 PHP Version:        Irrelevant
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

the problem is because when doing inherit, default static members will become 
reference between parent / child.

I am not sure, is this a expect behavior(http_cookie is derived class of 
http_object):

<?php
http\Object::setDefaultErrorHandling(http\Object::EH_NORMAL);

var_dump(http\Object::getDefaultErrorHandling());
var_dump(http\Cookie::getDefaultErrorHandling());
?>

//output
int(0)
int(0)


Previous Comments:
------------------------------------------------------------------------
[2012-12-09 13:20:05] laruence@php.net

The following patch has been added/updated:

Patch Name: bug63726.patch
Revision:   1355059205
URL:        https://bugs.php.net/patch-display.php?bug=63726&patch=bug63726.patch&revision=1355059205

------------------------------------------------------------------------
[2012-12-09 13:08:38] laruence@php.net

dmitry, could you review this patch please? thanks

------------------------------------------------------------------------
[2012-12-09 13:07:37] laruence@php.net

The following patch has been added/updated:

Patch Name: bug63726.patch
Revision:   1355058457
URL:        https://bugs.php.net/patch-display.php?bug=63726&patch=bug63726.patch&revision=1355058457

------------------------------------------------------------------------
[2012-12-09 12:32:48] laruence@php.net

compiled successfully, and reproduced this problem now :)

thanks

------------------------------------------------------------------------
[2012-12-09 11:37:15] mike@php.net

Could you please "svn up" and try again? There were some odd includes on the top 
of php_http_curl_client.c

Thank you

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=63726


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63726&edit=1


Thread (18 messages)

« previous php.bugs (#175252) next »