Is The Connection Kept If I Break Out Of A Datareader?

Just wondering. I have the following code:




$cmd=Yii::app()->db->createCommand($mySqlString);

//Some param bindings...

$reader=$cmd->query();

while($row=$reader->read()){

   if(something happens){

      break;

   }

}



Supposing that my reader has 3 rows, and that I break out of the while loop at the first iteration, is the connection kept? Or does Yii/PHP gets rid of it immediately?