diff options
| author | EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> | 2021-10-20 22:55:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 17:55:55 -0400 |
| commit | 4f7b8393ec8a3abd59649c2ba669e951fb61f3d2 (patch) | |
| tree | e1472181845acc8ca5f41bdef761b31648f8a7cb /ZAPD/Globals.h | |
| parent | 6f744be6bcec9ebf4bc852d00f3535e6f2352939 (diff) | |
Plug some large leaks, deprecate `Segment="128"` (#204)
* Fix freeing an uninitialised camData
* exporter leaks
* vtx leak fix
* Fix ZSkeleton OOB reading
* Improve segment assignment checking and add a default
Also prevents non-segmented files not being freed
* Plug leak in MakeDlist
* More segment improvements: deprecate 128
* add externalfile to extraction reference
* whoops
* format
* Document new Segment behaviour
* Use deprecation ifdef
Co-authored-by: angie <angheloalf95@gmail.com>
Diffstat (limited to 'ZAPD/Globals.h')
| -rw-r--r-- | ZAPD/Globals.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ZAPD/Globals.h b/ZAPD/Globals.h index e90efc2..265f1af 100644 --- a/ZAPD/Globals.h +++ b/ZAPD/Globals.h @@ -24,6 +24,8 @@ typedef void (*ExporterSetFuncVoid3)(); class ExporterSet { public: + ~ExporterSet(); + std::map<ZResourceType, ZResourceExporter*> exporters; ExporterSetFuncVoid parseArgsFunc = nullptr; ExporterSetFuncVoid2 parseFileModeFunc = nullptr; @@ -64,10 +66,11 @@ public: std::map<uint32_t, std::string> symbolMap; std::string currentExporter; - static std::map<std::string, ExporterSet*>* GetExporterMap(); + static std::map<std::string, ExporterSet*>& GetExporterMap(); static void AddExporter(std::string exporterName, ExporterSet* exporterSet); Globals(); + ~Globals(); void AddSegment(int32_t segment, ZFile* file); bool HasSegment(int32_t segment); |
