From 73c5e170260638cc566cba2689ea570caee39251 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 16 Sep 2025 16:58:02 -0400 Subject: pke: major object lifetime overhaul. Added pke-test-load-unload to ensure objects are managed as expected. --- tests/pke-test-dummy.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/pke-test-dummy.cpp') diff --git a/tests/pke-test-dummy.cpp b/tests/pke-test-dummy.cpp index e8c34ba..914f3cf 100644 --- a/tests/pke-test-dummy.cpp +++ b/tests/pke-test-dummy.cpp @@ -11,8 +11,12 @@ #include "static-ui.hpp" #include "thread-pool.hpp" +static pk_membucket *bkt; + int pke_test_dummy_001() { - pk_ev_init(nullptr); + bkt = pk_mem_bucket_create("pke_test_dummy", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE); + pk_mem_bucket_set_client_mem_bucket(bkt); + pk_ev_init(bkt); Physics_Init(); PkeThreads_Init(); AM_Init(); @@ -40,6 +44,9 @@ int pke_test_dummy_001() { PkeThreads_Teardown(); Physics_Teardown(); pk_ev_teardown(); + pk_mem_bucket_destroy(bkt); + pk_mem_bucket_set_client_mem_bucket(nullptr); + bkt = nullptr; return 0; } -- cgit v1.2.3