persistentstorage/sql/SRC/Common/SqlMap.inl
branchRCL_3
changeset 11 667e88a979d7
parent 0 08ec8eefde2f
child 31 ba1c4f4a893f
equal deleted inserted replaced
10:fa9941cf3867 11:667e88a979d7
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   130 		TSqlPair<KEY, DATA, REFCNTR>& pair = iSet[idx];
   130 		TSqlPair<KEY, DATA, REFCNTR>& pair = iSet[idx];
   131 		if(pair.iRefCounter.Decrement() == 0)
   131 		if(pair.iRefCounter.Decrement() == 0)
   132 			{
   132 			{
   133 			iDestructor.Destroy(pair.iKey, pair.iData);
   133 			iDestructor.Destroy(pair.iKey, pair.iData);
   134 			iSet.Remove(idx);
   134 			iSet.Remove(idx);
       
   135 #ifdef _DEBUG
       
   136 //This is used prevent the failure of the resource allocation checking in debug mode. 
       
   137                 if(iSet.Count() == 0)
       
   138                     {
       
   139                     iSet.Reset();
       
   140                     }
       
   141 #endif  
   135 			}
   142 			}
   136 		return;
   143 		return;
   137 		}
   144 		}
   138 	__SQLASSERT(EFalse, ESqlPanicInternalError);
   145 	__SQLASSERT(EFalse, ESqlPanicInternalError);
   139 	}
   146 	}