From 80ed1262bd654fe2de30389f97a985b5f2c1d783 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 30 Oct 2024 21:51:06 +0100 Subject: add more containers and fix use after free --- backend/PtrList.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 backend/PtrList.hpp (limited to 'backend/PtrList.hpp') diff --git a/backend/PtrList.hpp b/backend/PtrList.hpp new file mode 100644 index 0000000..96f2643 --- /dev/null +++ b/backend/PtrList.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "PtrList.h" + +template +PtrList::~PtrList() { + for (T * obj : *this) + delete obj; +} + -- cgit v1.2.3