36 { |
36 { |
37 // Scheduler |
37 // Scheduler |
38 CActiveScheduler* scheduler = new (ELeave) CActiveScheduler(); |
38 CActiveScheduler* scheduler = new (ELeave) CActiveScheduler(); |
39 CActiveScheduler::Install( scheduler ); |
39 CActiveScheduler::Install( scheduler ); |
40 CleanupStack::PushL( scheduler ); |
40 CleanupStack::PushL( scheduler ); |
41 |
41 |
42 // Get command line |
42 // Get command line |
43 CCommandLineArguments* args = CCommandLineArguments::NewLC(); |
43 CCommandLineArguments* args = CCommandLineArguments::NewLC(); |
44 |
44 |
45 //-- |
|
46 CConsoleBase* console = Console::NewL( KMemSpyCLIName, TSize( KConsFullScreen, KConsFullScreen ) ); |
|
47 CleanupStack::PushL( console ); |
|
48 //-- |
|
49 |
|
50 // Command line manager |
45 // Command line manager |
51 CMemSpyCommandLine* commandLineMgr = CMemSpyCommandLine::NewLC( *console ); |
46 CMemSpyCommandLine* commandLineMgr = CMemSpyCommandLine::NewLC(); |
52 |
47 |
53 // Play nicely with external processes |
48 // Play nicely with external processes |
54 RProcess::Rendezvous( KErrNone ); |
49 RProcess::Rendezvous( KErrNone ); |
55 |
50 |
56 // Perform op |
51 // Perform op |
57 commandLineMgr->PerformOpL( *args ); |
52 commandLineMgr->PerformOpL( *args ); |
58 |
53 |
59 // Tidy up |
54 // Tidy up |
60 //CleanupStack::PopAndDestroy( 3, scheduler ); // scheduler, args, commandLineMgr |
55 CleanupStack::PopAndDestroy( 3, scheduler ); // scheduler, args, commandLineMgr |
61 CleanupStack::PopAndDestroy( 4 ); // scheduler, args, console, commandLineMgr |
|
62 } |
56 } |
63 |
57 |
64 |
58 |
65 |
59 |
66 // --------------------------------------------------------------------------- |
60 // --------------------------------------------------------------------------- |