Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
25 typedef void (*TMemoryCleanupCallback)(TAny*);
30 void Add(TMemoryCleanupCallback aCallback, TAny* aArg);
31 static void Cleanup(TAny* aDummy=0);
34 FORCE_INLINE TMemoryCleanup()
38 FORCE_INLINE ~TMemoryCleanup()
40 __NK_ASSERT_DEBUG(iCallback==0);
41 // This 'generic' cleanup API isn't safe in the situation where an object
42 // being cleaned up is deleted. This is currently not a problem because
43 // we only use this for permanent objects, but to help prevent future bugs
44 // assert that this object is never deleted...
45 __NK_ASSERT_ALWAYS(0);
48 TMemoryCleanup* iNext;
49 TMemoryCleanupCallback iCallback;