summaryrefslogtreecommitdiff
path: root/src/corelib/arch/symbian/qatomic_symbian.cpp
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2009-08-19 09:49:19 +0100
committermread <qt-info@nokia.com>2009-08-19 09:49:19 +0100
commit9addeea6f35a7f1b1c20d818dd022ed64086a6a2 (patch)
tree32456c80e51561ee40f437bddcd734a09c4f942b /src/corelib/arch/symbian/qatomic_symbian.cpp
parenta1cfdc273bac90d58754c286810353ccb0be4b2e (diff)
downloadqt4-tools-9addeea6f35a7f1b1c20d818dd022ed64086a6a2.tar.gz
renamed and restyled exit info printer
Diffstat (limited to 'src/corelib/arch/symbian/qatomic_symbian.cpp')
-rw-r--r--src/corelib/arch/symbian/qatomic_symbian.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp
index b08a468061..e418c095a2 100644
--- a/src/corelib/arch/symbian/qatomic_symbian.cpp
+++ b/src/corelib/arch/symbian/qatomic_symbian.cpp
@@ -44,33 +44,40 @@
#include <e32debug.h>
-// Heap and handle info printer. This code is placed here as it happens to make it the very last static to be destroyed in a Qt app.
+QT_BEGIN_NAMESPACE
+
+// Heap and handle info printer.
// This way we can report on heap cells and handles that are really not owned by anything which still exists.
// This information can be used to detect whether memory leaks are happening, particularly if these numbers grow as the app is used more.
-struct SPrintExitInfo
+// This code is placed here as it happens to make it the very last static to be destroyed in a Qt app. The
+// reason assumed is that this file appears before any other file declaring static data in the generated
+// Symbian MMP file. This particular file was chosen as it is the earliest symbian specific file.
+struct QSymbianPrintExitInfo
{
- SPrintExitInfo()
+ QSymbianPrintExitInfo()
{
- RThread().HandleCount(initProcessHandleCount,initThreadHandleCount);
+ RThread().HandleCount(initProcessHandleCount, initThreadHandleCount);
initCells = User::CountAllocCells();
}
- ~SPrintExitInfo()
+ ~QSymbianPrintExitInfo()
{
RProcess myProc;
TFullName fullName = myProc.FileName();
TInt cells = User::CountAllocCells();
TInt processHandleCount=0;
TInt threadHandleCount=0;
- RThread().HandleCount(processHandleCount,threadHandleCount);
+ RThread().HandleCount(processHandleCount, threadHandleCount);
RDebug::Print(_L("%S exiting with %d allocated cells, %d handles"),
- &fullName,
- cells - initCells,
- (processHandleCount + threadHandleCount) - (initProcessHandleCount + initThreadHandleCount));
+ &fullName,
+ cells - initCells,
+ (processHandleCount + threadHandleCount) - (initProcessHandleCount + initThreadHandleCount));
}
TInt initCells;
TInt initProcessHandleCount;
TInt initThreadHandleCount;
-} printExitInfo;
+} symbian_printExitInfo;
+
+QT_END_NAMESPACE
#if defined(Q_CC_RVCT)