--- a/sysresmonitoring/oommonitor/src/oomcloseapp.cpp Fri Aug 06 10:45:02 2010 +0300
+++ b/sysresmonitoring/oommonitor/src/oomcloseapp.cpp Mon Aug 16 13:23:30 2010 +0300
@@ -59,15 +59,20 @@
RThread thread;
TInt err=thread.Open(iCurrentTask.ThreadId());
- if (!err)
+ if (err == KErrNone)
{
RProcess process;
- thread.Process(process);
- TBool isDataPaged = process.DefaultDataPaged();
- if((aIsDataPaged && isDataPaged) || (!aIsDataPaged && !isDataPaged ))
+ err = thread.Process(process);
+ if(err == KErrNone)
{
- iCurrentTask.EndTask();
+ TBool isDataPaged = process.DefaultDataPaged();
+ if((aIsDataPaged && isDataPaged) || (!aIsDataPaged && !isDataPaged ))
+ {
+ iCurrentTask.EndTask();
+ }
+ process.Close();
}
+ thread.Close();
}
}