add memory safety
/ sync-to-origin (push) Waiting to run

This commit is contained in:
2025-03-31 20:26:56 +02:00
parent dfa0774242
commit 096b1d1eb6
6 changed files with 171 additions and 67 deletions
+23
View File
@@ -0,0 +1,23 @@
// header guard
#ifndef _ba_me_hg_
#define _ba_me_hg_
#include <cstddef>
#include <vector>
enum AllocationType {
WINDOW_ARRAY,
PANEL_ARRAY,
GENERIC_ARRAY,
WINDOW_TYPE,
PANEL_TYPE,
GENERIC_TYPE
};
struct allocation {
AllocationType type;
void *ptr;
std::size_t size;
};
void delete_all(std::vector<allocation> *allocated);
#endif