Move closing of database connection to CI_DB_driver->__destruct - #1376
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index ef77b59..c757277 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -92,6 +92,13 @@
 
 	// --------------------------------------------------------------------
 
+	public function __destruct()
+	{
+		$this->close();
+	}
+
+	// --------------------------------------------------------------------	
+
 	/**
 	 * Initialize Database Settings
 	 *