fixed bug found via mem leak: handles now closed at exit regardless of refcount

This was SVN commit r323.
This commit is contained in:
janwas 2004-05-30 00:57:20 +00:00
parent 1eaadd38aa
commit 47a4af4c82

View file

@ -246,6 +246,11 @@ static void cleanup(void)
// somewhat messy, but this only happens on cleanup.
// better than an additional h_free(i32 idx) version though.
Handle h = handle(i, hd->tag);
// HACK: must actually free the handles, regardless
// of current refcount. so, quick'n dirty solution: set it to 0.
hd->refs = 0;
h_free(h, hd->type);
}
}