Page 1 of 1

Guaranteed Malloc and Free?

PostPosted: Thu May 22, 2008 1:49 pm
by Cleve Blakemore
If we wanted to absolutely guarantee that one function was executed before a game started to initialize something and also that another routine was called before exiting, where would we put calls to these two routines?

I wanted to load binary files of structures at game start into dynamically allocated buffers, then make certain those buffers are freed upon exiting.

Would view.CreateActor and view.DestroyActor be good places to call these routines?

I thought I heard about a main() and exit() function one time on the forums but I cannot find the thread.

Re: Guaranteed Malloc and Free?

PostPosted: Thu May 22, 2008 4:50 pm
by makslane
The 'Create Actor' and 'Destroy Actor' events of the view are the right place