From bdfbe238f5eb2355a0ffc011d164366440c68407 Mon Sep 17 00:00:00 2001 From: BoluoMonster Date: Sat, 6 Jan 2024 13:53:12 +0800 Subject: [PATCH] initialize the 'allocated_' of the MemoryObject to avoid unexpected 'Free' or 'Allocate' operation --- include/despot/util/memorypool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/despot/util/memorypool.h b/include/despot/util/memorypool.h index 24562b02..e2c577c3 100644 --- a/include/despot/util/memorypool.h +++ b/include/despot/util/memorypool.h @@ -20,7 +20,7 @@ class MemoryObject { } private: - bool allocated_; + bool allocated_ = false; }; template