On Wed, February 20, 2008 9:23 am, Sylvain R. wrote:
> I would like to implement it in order to delete automaticly from
> memory
> useless objects.
> It can be really useful for example to make schedulers in PHP in order
> to
> avoid "max memory usage exceeded" errors.
If you really don't need it
I don't mean unset($this) is the best wy to allow an object to destroy
itself. I just say we miss something to auto destroy objects.
We could also think about a magic method like __destroy().
An object that destroys itself is a really bad idea from an architectural
point of view. I, as a consu
"Stut" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Sylvain R. wrote:
>> "Chris" <[EMAIL PROTECTED]> a écrit dans le message de news:
>> [EMAIL PROTECTED]
>>> Sylvain Rabot wrote:
Hello,
First of all I would like to know if one day we will be able to un
Sylvain R. wrote:
"Chris" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
Sylvain Rabot wrote:
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
"Chris" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Sylvain Rabot wrote:
>> 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 usag
Hence my previous gibberish, I would expect a reference to be destroyed
when the object is, but obviously it's not.
It has nothing specifically to do with objects, it's all about how
references are handled.
$ php -a
Interactive mode enabled
http://blog.libssh2.org/index.php?/archives/51-Yo
Chris wrote:
> Sylvain Rabot wrote:
>> 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.
>
> I doubt the php-dev's will ever allow something like that, s
Sylvain Rabot wrote:
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.
I doubt the php-dev's will ever allow something like that, seems rather
dangerous to me.
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
9 matches
Mail list logo