pp = new int[1000000];
it is unlikely to crash your system. most os are smart enough to not let you do that. It may slow down, though. even the above is going to take a bit to drain a new computer, feel free to add more zeros.
Thank you for help @jonnin! I just needed it to go over at least 1GB of memory leak. My os was using 3.5 GB (normal performance) and it went over to 5.5 GB with the program running.
Your program is crashing, but you are not creating a memory leak. new is throwing an exception for trying to allocate more memory than you have available.