[PHP3] unset($this) From: Stefan Powell (spowell <email protected>)
Date: 09/30/98

I've moved my scripts from a PHP3 3.0 machine to a 3.0.3 machine and it
seems that unset($this) is behaving differently. (if at all)

Since besthost.net is having such terrible bandwidth problems and they
will likely not have those problems fixed for many weeks (perhaps
months?) I had to move my site to another ISP. (Trying Alabanza.com and
blaze.ca - both good, but not great)

When I moved the scripts they stopped functioning properly. As far as I
can tell, this was due to some difference between version 3.0 and 3.0.3.

I have a database results class that has a function for freeing the
results handle and disposing the instance of the object...

class dbresultobj {
...
  function freeresult() {
    mysql_free_result($this->resulthandle);
    unset($this);
  }
...
}

The unset($this) seems to not operate properly now. The second time I
create an instance of the dbresultobj the script craps out.

How should I dispose of an object once I'm done with it?

--Stefan

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3