I\'ve been experiencing segfaults when running some C++ code. I\'ve isolated the problem to a line in the program that deletes a pointer. Here\'s a simple example that pro
You can't use delete on anything you didn't get with new. Trying to do so will cause undefined behaviour. Your program crashed, but anything could have happened.