fix refcount (now initialized to 1)
This was SVN commit r738.
This commit is contained in:
parent
98224f4a9e
commit
21e685b1f6
@ -246,8 +246,8 @@ void h_mgr_shutdown(void)
|
|||||||
Handle h = handle(i, hd->tag);
|
Handle h = handle(i, hd->tag);
|
||||||
|
|
||||||
// HACK: must actually free the handles, regardless
|
// HACK: must actually free the handles, regardless
|
||||||
// of current refcount. so, quick'n dirty solution: set it to 0.
|
// of current refcount. so, quick'n dirty solution: set it to 1.
|
||||||
hd->refs = 0;
|
hd->refs = 1;
|
||||||
|
|
||||||
h_free(h, hd->type);
|
h_free(h, hd->type);
|
||||||
}
|
}
|
||||||
@ -440,6 +440,7 @@ Handle h_alloc(H_Type type, const char* fn, uint flags, ...)
|
|||||||
hd->key = key;
|
hd->key = key;
|
||||||
hd->tag = tag;
|
hd->tag = tag;
|
||||||
hd->type = type;
|
hd->type = type;
|
||||||
|
hd->refs = 1;
|
||||||
Handle h = handle(idx, tag);
|
Handle h = handle(idx, tag);
|
||||||
|
|
||||||
// regular filename
|
// regular filename
|
||||||
|
Loading…
Reference in New Issue
Block a user