I\'m quite worry because I wrote a little application and it seems that there is a memory leak if I believe valgrind (What I actually do):
==9321== 251 bytes in
I suspect what's happening is the compiler is using NRVO to put your temporary string into its real return location. That return string is then stored inside an object that's allocated and leaked off the heap.