The memory leak could be the cause; you new[] three character arrays but you don't delete[] them. This isn't Java and you don't get a free garbage collector. I'm not sure why you want to use new/delete here anyway;
char ptrr[16];
is perfectly valid in this scenario, and since this is automatic you don't have to worry about cleanup, and this is likely a lot faster than digging around in the heap.