Use reference counting for identifiers

This commit is contained in:
2026-06-17 10:11:15 +10:00
parent 6d35acbe60
commit b4e481ed9c
16 changed files with 112 additions and 156 deletions

9
src/Free/Identifier.c Normal file
View File

@@ -0,0 +1,9 @@
#include "../../include/ground.h"
void _GroundFreeIdentifier(GroundIdentifier* identifier) {
identifier->referenceCount--;
if (identifier->referenceCount == 0) {
free(identifier->string);
free(identifier);
}
}