LOCAL_C TInt ThreadFunc(TAny*) { __UHEAP_MARK; CTrapCleanup* threadcleanup = CTrapCleanup::New(); TRAPD(err, ThreadMainL()); delete threadcleanup; __UHEAP_MARKEND; return err; }
TInt CAppMain::EntryPoint(TAny* /*aNone*/){ CTrapCleanup* cleanupStack=CTrapCleanup::New(); if(!cleanupStack){ PanicServer(ECreateTrapCleanup); } Log(_L("TInt CAppMain::EntryPoint() 1")); TRAPD(leave,ThreadMainL()); if(leave){ Log(_L("TInt CAppMain::EntryPoint() 2")); PanicServer(ESrvCreateServer); } delete cleanupStack; Log(_L("TInt CAppMain::EntryPoint() 3")); cleanupStack=NULL; return KErrNone; }
TInt CSharedQueueSrv::EntryPoint(TAny* /*aNone*/) { CTrapCleanup* cleanupStack = CTrapCleanup::New(); if (!cleanupStack) { User::Panic(KSharedQueueSrvName, ESrvCreateTrapCleanup); } TRAPD(leave, ThreadMainL()); if (leave) { User::Panic(KSharedQueueSrvName, ESrvCreateServer); } delete cleanupStack; cleanupStack = NULL; return KErrNone; }