aboutsummaryrefslogtreecommitdiff
path: root/backend/PtrList.hpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-30 21:51:06 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-30 21:51:06 +0100
commit80ed1262bd654fe2de30389f97a985b5f2c1d783 (patch)
tree020b1b63d637e07882c9a10d81fe2ac04ce82bcc /backend/PtrList.hpp
parentc45a436fc594101f676cfabe90225d825d935fec (diff)
add more containers and fix use after free
Diffstat (limited to 'backend/PtrList.hpp')
-rw-r--r--backend/PtrList.hpp10
1 files changed, 10 insertions, 0 deletions
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 <typename T>
+PtrList<T>::~PtrList() {
+ for (T * obj : *this)
+ delete obj;
+}
+