I have a generally bad habit (I think) of always checking the return value from new.
Is this completely worthless? If the system is out of memory (quite unlikely, but still) perhaps the program is forced to close, an exception is thrown or something?Code:SomeData* data = new SomeData(); if(data == NULL) { //Error }
It's a bad habit I have, or?