David Brainlittle David Brainlittle - 2 months ago 9
C++ Question

Is there a way to create super fierce memory leaks?

I know that a common way to render memory leak is to assign a specific piece of memory address for a variable by new without releasing it. But is there a way to create epic and fierce memory leak that can very quickly force the computer to shutdown?

dd2 dd2
Answer

This takes a couple of seconds on my laptop.

int main(){
    for(;;){
        int *a=new int[1000];
    }
}