Reclaim cancelled heap timers before checking async resource counters

This commit is contained in:
evgeny committed 2026-10-26 09:08:42 +01:00
1 parent 68ead8c7dc
commit 817e3744ee
1 file changed
+1
+1
View File
@@ -209,6 +209,7 @@ int main(void) {
size_t baseline = u_get_allocated_count();
struct UASYNC* ua = uasync_create(); assert(ua);
test_creation(ua); test_reload(ua); test_headless(ua);
uasync_poll(ua, 0); // удалённые heap-таймеры освобождаются при следующем poll
debug_set_category_level(DEBUG_CATEGORY_SYS, DEBUG_LEVEL_INFO);
uasync_print_resources(ua, "instance contract before owner destroy");
assert(ua->timer_alloc_count == ua->timer_free_count && ua->socket_alloc_count == ua->socket_free_count);