Do we have to free the memory when we are stopping the program?
I am currently dealing with a crash which is originated from Access violation reading location, i.e. Basically, program is trying to read a pointer which is not in the memory anymore. I can get around with it if i dont free that pointer on stopping the application which is not a best practice.
Should I just set it to NULL? But I dont think it is the same thing as this is C++, not Java.
Does anyone have any suggestions?
I am currently dealing with a crash which is originated from Access violation reading location, i.e. Basically, program is trying to read a pointer which is not in the memory anymore. I can get around with it if i dont free that pointer on stopping the application which is not a best practice.
Should I just set it to NULL? But I dont think it is the same thing as this is C++, not Java.
Does anyone have any suggestions?
Comment