From 817e3744ee96cb387a8b0bb8527ebf8cfe875844 Mon Sep 17 00:00:00 2001 From: evgeny Date: Mon, 26 Oct 2026 03:51:09 +0100 Subject: [PATCH] Reclaim cancelled heap timers before checking async resource counters --- tests/test_instance_contract.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_instance_contract.c b/tests/test_instance_contract.c index 2597cac0..8c4a5b89 100644 --- a/tests/test_instance_contract.c +++ b/tests/test_instance_contract.c @@ -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);