2 ms·
From the linked blog, an example of how to copy a 4-letter string from a constant string into a new heap-allocated string: HBufC* heapbasedFred=HBufC::NewL(4
by pavlov 6y ago
From the linked blog, an example of how to copy a 4-letter string from a constant string into a new heap-allocated string:
HBufC* heapbasedFred=HBufC::NewL(4);
TPtr fredPtr(heapbasedFred->Des());
_LIT(KFred, “fred”);
fredPtr.Copy(KFred);
I had forgot it was this bad.
It's kind of weird that Symbian calls these descriptors, but the actual types and macros don't use that word at all — they are HBufC, TPtr and _LIT.