Use descriptors correctly

There are two types of descriptors: heap descriptors (HBufC) and stack descriptors (TBuf). All descriptors use one of these types for storage. When the stack overflows, 90 percent of the time it is caused by large descriptors on the stack. Be aware of operations that cause implicit copying of descriptors, and avoid them where possible. It may be better in some situations to allocate HBufCs to work on rather than TBufs

Some related Symbian OS classes, such as TParse, can also use up a lot of stack space. Consider using alternative versions that use less stack space (for example, TParseBase).

Passing descriptors by reference is preferred to passing by value.