I do not know what to do next ... its hopeless. I get tired of guessing what causes the accident. I recently noticed that some opengl calls accidentally run programs on some gfx cards. therefore, I am becoming really paranoid, which can lead to failures now. The bad thing about this crash is that it crashes only after a long time using the program, so I can only guess what the problem is.
I can’t remember what changes I made to the program, which can cause crashes, it took so long. But, fortunately, the previous version does not crash, so I can just copy some code and spend 10 hours to see at what point it starts to crash ... I don’t think I want to do it yet.
The program crashes after I process these files about 5 times in a row, each time it uses about 200 megabytes of memory. It is interrupted randomly during and after the reading process.
I create a "safe" function free (), it checks the pointer if it is not NULL, and then frees memory, and then sets the pointer to NULL. Shouldn't this be done?
I watched the memory of the task manager, and before it crashed, he started eating 2 times more memory than usual. Also, loading the program became exponentially slower every time I downloaded files; the first few loads did not look much slower apart, but then he quickly began to double download speeds. What should this tell me about the accident?
Also, do I need to manually release C ++ vectors using clear ()? Or are they freed after use automatically, for example, if I select a vector inside a function, will it be freed every time the function ends? I do not save pointers in a vector.
-
Soon: I want to learn how to catch damned mistakes as quickly as possible, how to do this? Using Visual Studio 2008.
c ++ visual-studio-2008 windows-xp opengl
Newbie
source share