<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> > As far as I know, PHP's garbage collector will free the memory used by<br>
> 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'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;"> > This means that if I create an object of type User via the "new"<br>
> operator in my own function, its memory will be freed as soon as I<br> > leave my function. However, if I use a static reference to that<br> > object, its memory will not be freed until the request is over.<br>
></blockquote><div><br>Oscar, You are right about this , I really forget PHP5's own garbage collection, according 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'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>