> -----Original Message----- > From: ask me [mailto:edd@edd.getmyip.com] > Sent: July 7, 2003 3:16 PM > To: php-objects@yahoogroups.com > Subject: [php-objects] destructors > > in c++ theres ~class_name(), whcih runs when you delete an object... > is there such a feature in php? From the PHP manual, "There are no destructors in PHP 3 or PHP 4. You may use register_shutdown_function() instead to simulate most effects of destructors." > do mysql links require deleting? just wondering this as i use the > variable name $link to refer to mysql connections in more than one > file, and often this is included more than once (bad programming, but > ive not thought it through yet). Does it matter that the link has the > same name, when i delete it once, does it delete all occances? PHP will (should?) automatically free up all resources at the end of the script. If you don't unset your variables within your own script, all that means is that your script might take up more memory than it would otherwise need while its running, but once it finishes, all scripts take up the same amount of memory; that is to say zero memory. The exception is if you use persistent MySQL connections, which I recommend you don't. You need to manually release those type of connections. - Nebu ------------------------ Yahoo! Groups Sponsor ---------------------~--> Inkjet cartridges up to 80% off. HP, Epson, Lexmark--we have your brand. Free shipping on every order to the U.S. and Canada! Excellent service. http://www.c1tracking.com/l.asp?cid=5510 http://us.click.yahoo.com/QWB0QC/.eUGAA/ySSFAA/saFolB/TM ---------------------------------------------------------------------~-> Look here for Free PHP Classes of objects: http://phpclasses.UpperDesign.com/ To unsubscribe from this group, send an email to: php-objects-unsubscribe@egroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/