Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to allocate and de-allocate cleanup stacks

The main categories of programs (GUI applications and servers) both have cleanup stacks created for them as part of their respective frameworks. Simple console programs for test and demonstration purposes though require a cleanup stack to be explicitly allocated.

Allocate the stack at the beginning of the thread as follows:

TheTrapCleanup=CTrapCleanup::New();

De-allocate the cleanup stack at the end of the thread as follows:

delete TheTrapCleanup;


Notes