It's not a memory leak (ther was nothing new'd), but it is something dangerous: your pointers are pointing at read-only memory, but their types are "pointer to modifiable char". It's better (and, since C++11, it's the only valid code) if their types are "pointers to const char", as in