after i have finished with my result set from a active record query in a codeigniter model, should i use $query->free_result() or does activerecord automatically do that?
+3
A:
PHP will clean up everything after your script is done. However, if you have lots of queries in, say, a loop, the results will not be cleaned up after each iteration.
So, if you run lots of queries in a loop, you probably will want to free_result() to clear up memory. Otherwise, it's not necessary. See here for details:
v3
2009-04-21 23:58:32
Good question, good answer.
GloryFish
2009-04-22 14:25:57