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);
Top of page

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.
Top of page

Example

double *workspace = NULL; //--------------------------------------------------------------------------- void __stdcall onSimCreate(void) { // allocate workspace workspace = new double[100]; } //--------------------------------------------------------------------------- void __stdcall onSimDestroy(void); { // free workspace delete [] workspace; workspace = NULL; } //---------------------------------------------------------------------------
Top of page

See Also

onSimCreate, onSimReady.
Top of page
[Rik's Office Hours] [Contact Rik]
Last updated: Fri Apr 30 2004, 1:43pm