char* to string + cleanup