News for hackers. Stuff that matters.
Re:Symbian Won by pavlov on Thursday June 25, 2020 @10:32AM (#23641176)
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.

There are no comments on this comment yet.