I was just wondering how you could create a system memory leak using C++. I have done some googling on this but not much came up, I am aware that it is not really feasible t
#include void main(){ for(int i = 0; i < 1000; i++) double* ptr = (double*)malloc(1000000*sizeof(double)) //free(ptr); ptr = NULL; }
note : the hashed line of code caused a memory leak while the process allocated it and did't return it back to the OS