|
Help!
by VoroneTZ. 10/14/25 05:04
|
|
|
|
|
|
|
|
|
DoSomething before Engine shut down
#408488
10/02/12 11:06
10/02/12 11:06
|
Joined: Dec 2003
Posts: 1,225 germany
gri
OP
Serious User
|
OP
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
hey,
with many structs and malloc'ated memory I need a possibility to free and clean up the memory before the engine closes.
Yes I know about sys_exit but what if the user shut down the engine via ESC key? What is the best practice in that case?
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
Re: DoSomething before Engine shut down
[Re: sivan]
#408493
10/02/12 11:59
10/02/12 11:59
|
Joined: Dec 2003
Posts: 1,225 germany
gri
OP
Serious User
|
OP
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
thank you both. great! I thought on_exit is only called on sys_exit. Sorry Sivan I could not belive that on_exit got called even on engine crash. So I gave on_exit the functionality to create a single file in the folder.....and yes a forced crash let the file occuring before the engine dies. Works with ESC key too. Now I have the event for cleaning work Thank you again.
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
|