コード例 #1
0
END_TEST

void graphBlankCreateDestroy ()
{
	g = worldgenCreateBlankGraph ();
	e = graphGetRawEdges (g);
	v = graphGetRawVertices (g);
	graphDestroy (g);
}
コード例 #2
0
ファイル: statemachine.c プロジェクト: valeth/games
bool sthDestroy(StateHandler sth)
{
	bool success = true;

	if (sth) {
		if (sth->states) {
			State quit_state = graphGetData(sth->states, 0);

			if (quit_state) {
				sthDelState(quit_state);
			}

			graphDestroy(sth->states);
			sth->states = NULL;
		}

		free(sth);
	} else {
		success = false;
	}

	return success;
}