Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12/src/compiler/c-target/fragments/shutdown.in
ViewVC logotype

View of /branches/vis12/src/compiler/c-target/fragments/shutdown.in

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1870 - (download) (annotate)
Fri May 11 17:44:18 2012 UTC (8 years, 8 months ago) by nseltzer
File size: 555 byte(s)
Fixed memory leaks.
//! shutdown and deallocate the world
void @PREFIX@Shutdown (@PREFIX@World_t *wrld)
    biffMsgNix (wrld->errors);
    FreeGlobals (wrld);
    FREE (wrld->globals);
    FREE (wrld->sched);

  // free strand objects
    for (int i = 0;  i < wrld->numStrands;  i++) {
	FREE (wrld->inState[i]);
	FREE (wrld->outState[i]);

  // free state arrays
    FREE (wrld->inState);
    FREE (wrld->outState);
    FREE (wrld->status);

    FREE (wrld->base);
    FREE (wrld->size);

    FREE (wrld);

} // @PREFIX@Shutdown

ViewVC Help
Powered by ViewVC 1.0.0