CodeIgniter如何关闭数据库连接?

I'm wondering how CodeIgniter close db connections. In the doc, it says "CodeIgniter intelligently takes care of closing your database connections". But how does CodeIgniter do this? Seems I didn't find the db driver's close method get called in CodeIgniter 3.0.3 source code.

Follow the code. If

$this->db->close() 

is called for an action, first thing you should look is

DB.php

file with

CI_DB

class within. There you would see that there is no

close()

method and you should then make search in

DB_driver.php

file which holds

CI_DB_driver

class that is extended class by

CI_DB

class. And Eureca! method with code is there. :) Of course, all these files are in system directory.