I have disabled "destryo_on_close" in codeIgniter session configuration.
I do not need it very much but for one instance.
I have put "remember me" checkbox for the user login.
As usual, when user logs in I set sessions to keep him logged in. But, if the user uncheck remember me, I have to make $this->session->userdata('email') to be destroyed on user browser close event. CodeIgniter has this option generally for all sessions which I do not want and only need it in the case user unchecks 'remember me' and only for 'email' session.