Rik's Treehouse
>
Babbling in Binary
>
My Software
>
Orphanware
>
R2DToo
>
R2DToo Help
>
For the Programmer
> onSimDestroy
onSimDestroy
Declaration
Remarks
Example
See Also
Declaration
void __stdcall onSimDestroy(void);
Remarks
This optional function may be provided by the model. It is called at the end of every simulation (for instance, before a new simulation replaces an old one or when the program is closed). It is intended to provide a place to clean up after a simulation. This function is called before the agent array is freed.
Example
double *workspace = NULL; //--------------------------------------------------------------------------- void __stdcall onSimCreate(void) { // allocate workspace workspace = new double[100]; } //--------------------------------------------------------------------------- void __stdcall onSimDestroy(void); { // free workspace delete [] workspace; workspace = NULL; } //---------------------------------------------------------------------------
See Also
onSimCreate
,
onSimReady
.
[Rik's Office Hours]
[Contact Rik]
Last updated: Fri Apr 30 2004, 1:43pm