[eluser]-sek[/eluser]
No one?
I understand that PHP will free database resources when the code execution ends. I understand that CI may free resources after it completes. The exception being, as the documents imply, when more than one query is run.
So if I have
query1
query2
and they do not free resources each time, they will leave resources open until all the code executes.
The question is, when I use
return [db query object]
I assume it does not free the resource and the caller would have to free it after it was through with the result.
Or instead of returning the db query object, I'd have to write in the model function
$query = $this->db->query($sql, array($id, $date, $text));
$query->free_result();
return $query;
Do I have this correct?