Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does codeigniter 2 handle classes and objects

I'm new to CodeIgniter, and I was wondering how the system handles all classes and objects. If i have a lot of models, views and controllers does the system release them, when not in use or do i have to do it myself?

an example:

class Myclass extends CI_Controller {

 public function __construct(){
      parent::_construct();
 }

 public function some_function(){
    $this->load->view("some_view");
 }

}

I also got a question on the database part. Does CodeIgniter save query results, or do I have to release every query, I don't want to be saved with $query->free_result() ?

like image 831
user1724347 Avatar asked Mar 26 '26 12:03

user1724347


1 Answers

Active records does it automatically. for more details please check http://codeigniter.com/user_guide/database/results.html

And just to inform you that codeigniter has its own fantastic documentation for his core library. So, if you follow their guidlines then you will be codeigniter geek.

like image 181
Hasib Tarafder Avatar answered Mar 28 '26 02:03

Hasib Tarafder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!