[eluser]gtech[/eluser]
That code looks like it does what you suggest and it does look like a bug, as you want to be setting the data after the destroy and create. if you look at the session code in the libraries directory you can see sess_destroy deleting the session from the database and removing the cookie
here is the documentation on what sess_destroy does:
Code:
Destroying a Session
To clear the current session:
$this->session->sess_destroy();
Note: This function should be the last one called,
and even flash variables will no longer be available.
If you only want some items destroyed and not all, use unset_userdata().
which also implies the code you have is a bit odd.
I have read in some posts that sess_destroy does delete the db but not the cache as data can still be echoed. [url="http://ellislab.com/forums/viewthread/94981/"]http://ellislab.com/forums/viewthread/94981/[/url] don't know if this has been fixed.
But looking at the session code; Even if the destroy session does not work the sess_create() function should overwrite the array as a new one is created.