internetradio2.0/favoritesdbsrc/irfavoritesdb.cpp
changeset 5 0930554dc389
parent 3 ee64f059b8e1
child 8 3b03c28289e6
equal deleted inserted replaced
3:ee64f059b8e1 5:0930554dc389
   236 	//need to delete it in the favorite list. 
   236 	//need to delete it in the favorite list. 
   237 	for( TInt i=0; i<count; i++ )
   237 	for( TInt i=0; i<count; i++ )
   238 	{	     
   238 	{	     
   239 	    if( aId == iFavPresetList[i]->Id())
   239 	    if( aId == iFavPresetList[i]->Id())
   240 	    {
   240 	    {
       
   241 	    	  //before Remove, the memory should be freed ahead. 
       
   242 	        delete iFavPresetList[i];
   241 	        iFavPresetList.Remove(i);	         
   243 	        iFavPresetList.Remove(i);	         
   242 	        break;
   244 	        break;
   243 	    }
   245 	    }
   244 	}
   246 	}
   245 	IRLOG_DEBUG( "CIRFavoritesDb::DeletePresetL - Exiting." );
   247 	IRLOG_DEBUG( "CIRFavoritesDb::DeletePresetL - Exiting." );