Original Post
Hi, Does anyone know of and reason why new and delete must be in the same class?. My code contains this: char* cAsciiArrayPtr = NULL; cAsciiArrayPtr = arrayCopier.copyToCharArray(argv[1]); (the 'new' is in here) cAsciiArrayPtr = NULL; delete[] cAsciiArrayPtr; I can't see why it would cause a memory leak but I just thought I'd check it out. Is there an easy way to check for memory leaks when degugging with Microsoft Visual C++?