Reply to freeing objects

Your name:

Reply:


Posted by julian_m on 09/27/69 11:37

Let's say that I've the following code (pseudo code cause this is a
question about how php gc works)

file class.php
------------------
class ClassX {
//var $F_strDB;
others vars here

function DoWathEverDBJob(){
connectToDB (using class variables as $F_strDB)
queryDB
process results
(# 1)
return (true-false, not an array nor a result set)
}

} //class


file test.php
------------------
$classX = new ClassX;
$classX ->DoWathEverDBJob();
(# 2)


Questions

-Should I have to call mysql_free_result in (# 1)

-Should I have to "destroy" $classX in any way in (# 2)

I used to think that objects and queys would be destroyed
automatically, but i'm not sure right now...

regards - jm

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация