<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> &gt;&nbsp;&nbsp;As far as I know, PHP&#39;s garbage collector will free the memory used by<br>
 &gt;&nbsp;&nbsp;an object as soon as the object is out of the current execution scope.<br> <br> <br>garbage collection should come with some costs, although I didn&#39;t do<br> the actual testings</blockquote><div><br>Howard, perhaps you can do some tests for this to support the idea. <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> &gt;&nbsp;&nbsp;This means that if I create an object of type User via the &quot;new&quot;<br>
 &gt;&nbsp;&nbsp;operator in my own function, its memory will be freed as soon as I<br> &gt;&nbsp;&nbsp;leave my function. However, if I use a static reference to that<br> &gt;&nbsp;&nbsp;object, its memory will not be freed until the request is over.<br>
 &gt;</blockquote><div><br>Oscar, You are right about this , I really forget PHP5&#39;s own garbage collection, according&nbsp; to the search results of google, the memory will release when the function is close.<br></div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">This is good, so you can have internal cache, to avoid duplicated query.</blockquote><div><br>
mmm...., Lifetype already has it&#39;s own DAO cache, I think this is not the problem. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 Howard<br> _______________________________________________<br> pLog-svn mailing list<br> <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br> <a href="http://limedaley.com/mailman/listinfo/plog-svn">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
 </blockquote></div><br>