[eluser]iConTM[/eluser]
I have some memory issues in my application.
The problem occurred when I added a second database to the party.
In the MY_Model class I load the 2 databases.
so each submodel can access the objects.
Code:
class MY_Model extends Model {
protected static $_db1 = null;
protected static $_db2 = null;
function MY_Model()
{
parent::Model();
if (!self::$_db1)
self::$_db1 = $this->load->database('db1', true);
if (!self::$_db2)
self::$_db2 = $this->load->database('db2', true);
}
}
is this a good practice and why does it absorbe so much memory?