It really depends on what COM object your using. If the COM is an
application with a specific close function, then you should use this
aswell as unsetting the assigned variable.

I had great problems getting Excel to shutdown once it was initiated
from within PHP, simply unsetting a variable in PHP won't do this, and
you quickly get a flooded machine with no memory or CPU power :p

chris kranz
fatcuban.com



-----Original Message-----
From: Michael Power [mailto:[EMAIL PROTECTED] 
Sent: 28 February 2003 11:58
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Re: destroying COM objects


> "Rich Gray"
>
> I may be talking out of my proverbial but I believe unset() will just
remove
> the reference to the object it won't destroy the object itself which 
> is
why
> I suggested $obj = null in my earlier message... however I'm probably
being
> pedantic as the next gc cycle will clean up objects with a 0 reference
count
> anyway...
>
> I suppose...
>
> $obj = null;
> unset($obj);
>
> Would cover all bases...
> Cheers
> Rich
>


Not too sure although your point sounds correct.  I must admit I don't
use COM much via PHP so have not had to learn too much for what I need.
Just what I have used has always caused problems unless I use unset().

If all else fails maybe you could write a little command line app which
receives the COM reference and kills it...

Cheers
Mike



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to