persistentstorage/dbms/udbms/UD_CACHE.CPP
changeset 55 44f437012c90
parent 0 08ec8eefde2f
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1998-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".
    97 	CCache* cache = new( ELeave, sizeof( TEntry ) * ( aSize - 1 ) ) CCache( aSize );	// get the extra size for the cache entries, leaves on error
    97 	CCache* cache = new( ELeave, sizeof( TEntry ) * ( aSize - 1 ) ) CCache( aSize );	// get the extra size for the cache entries, leaves on error
    98 	CleanupClosePushL( *cache );
    98 	CleanupClosePushL( *cache );
    99 	User::LeaveIfError( UserHal::TickPeriod( cache->iTickPeriod ) );
    99 	User::LeaveIfError( UserHal::TickPeriod( cache->iTickPeriod ) );
   100 	User::LeaveIfError( UserSvr::DllSetTls( TlsHandle(), cache ) );
   100 	User::LeaveIfError( UserSvr::DllSetTls( TlsHandle(), cache ) );
   101 	if (aUseTimer)
   101 	if (aUseTimer)
       
   102 		{
       
   103 		// coverity[negative_returns]
   102 		cache->iTimer = CPeriodic::NewL( ETimerPriority );
   104 		cache->iTimer = CPeriodic::NewL( ETimerPriority );
       
   105 		}
   103 	CleanupStack::Pop();
   106 	CleanupStack::Pop();
   104 	return cache;
   107 	return cache;
   105 	}
   108 	}
   106 
   109 
   107 inline void RDbCache::CCache::Open()
   110 inline void RDbCache::CCache::Open()