kernel/eka/drivers/resmanus/d_resmanus.cpp
changeset 252 0a40b8675b23
parent 244 a77889bee936
child 271 dc268b18d709
equal deleted inserted replaced
245:647ab20fee2e 252:0a40b8675b23
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1995-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 the License "Eclipse Public License v1.0"
     4 // under the terms of the License "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".
  2159 void DChannelResManUs::RemoveTrackingControl(TTrackingControl*& aTracker)
  2159 void DChannelResManUs::RemoveTrackingControl(TTrackingControl*& aTracker)
  2160     {
  2160     {
  2161     __KTRACE_OPT(KRESMANAGER, Kern::Printf("DChannelResManUs::RemoveTrackingControl()"));
  2161     __KTRACE_OPT(KRESMANAGER, Kern::Printf("DChannelResManUs::RemoveTrackingControl()"));
  2162 
  2162 
  2163 	// Free the resource-tracking links and their respective queues
  2163 	// Free the resource-tracking links and their respective queues
  2164 	TAny* buf;
       
  2165 	if(aTracker->iFreeQue!=NULL)
  2164 	if(aTracker->iFreeQue!=NULL)
  2166 		{
  2165 		{
  2167 		while(!aTracker->iFreeQue->IsEmpty())
  2166 		while(!aTracker->iFreeQue->IsEmpty())
  2168 			{
  2167 			{
  2169 			buf = (TAny*)(aTracker->iFreeQue->GetFirst()); // Dequeues the element
  2168 			delete aTracker->iFreeQue->GetFirst(); // Dequeues the element;
  2170 			delete buf;
       
  2171 			}
  2169 			}
  2172 		delete aTracker->iFreeQue;
  2170 		delete aTracker->iFreeQue;
  2173 		}
  2171 		}
  2174 
  2172 
  2175 	if(aTracker->iBusyQue!=NULL)
  2173 	if(aTracker->iBusyQue!=NULL)
  2176 		{
  2174 		{
  2177 		while(!aTracker->iBusyQue->IsEmpty())
  2175 		while(!aTracker->iBusyQue->IsEmpty())
  2178 			{
  2176 			{
  2179 			buf = (TAny*)(aTracker->iBusyQue->GetFirst()); // Dequeues the element
  2177 			delete aTracker->iBusyQue->GetFirst(); // Dequeues the element;
  2180 			delete buf;
       
  2181 			}
  2178 			}
  2182 		delete aTracker->iBusyQue;
  2179 		delete aTracker->iBusyQue;
  2183 		}
  2180 		}
  2184 	delete aTracker;
  2181 	delete aTracker;
  2185     }
  2182     }