correct way to finish-close a big game or program.
Blitz3D Forums/Blitz3D Programming/correct way to finish-close a big game or program.
| ||
hi, i working in a big game, i mean with "big" becouse i have a lot of sounds, b3d, images and textures. today my computer crash when i playing my program.. i think the problem was becosue i don't end the game correctly. my question is, how i must close my program to free all objects of the memory? clearworld is ok? or i must to delete all types, and the entitys inside?.. when i delete a type, all mesh inside the type (car\mesh) for example, are free of the memory? same with sounds? |
| ||
Blitz will handle all memory de-allocation upon closing. You only need to manage these things while the program is running. |
| ||
ClearWorld clears *only* what the documentation says it does. Also, it doesn't set entity handles to zero, so if you try to do anything with an entity after ClearWorld, you'll get an error. Sounds should be manually freed, same with 3d sounds (which are still sounds - not entities). However, none of this matters if the game is closing completely. When you say "today my computer crash" - crash how? Error messages? BSOD? Automatic reboot? Or what? |
| ||
i run the program many times, and the pc crash in the middle of the game. without messages, no keyboard, mouse, only the still image of the games, no sound too. power botton no response too, only reset or 5 sec of power work. i use only End() when the pc crash to finish the program, now i going to free sounds. |
| ||
This sounds more like a hardware problem. GPU overheat? |
| ||
What OS are you using? |