Fix memory issues

This commit is contained in:
2025-12-01 10:36:09 +11:00
parent 6eeccf58fe
commit 995c1d984b
3 changed files with 53 additions and 20 deletions

View File

@@ -110,6 +110,9 @@ GroundValue createBoolGroundValue(bool in);
// Creates a GroundValue containing (in), with type LIST.
GroundValue createListGroundValue(List in);
// Creates a deep copy of a GroundValue
GroundValue copyGroundValue(const GroundValue* gv);
// If (gv) contains any data stored on the heap, frees it.
void freeGroundValue(GroundValue* gv);
@@ -156,4 +159,4 @@ ListAccess getListAt(List* list, int idx);
// Sets an item in list (list) at index (idx) to GroundValue (value).
ListAccessStatus setListAt(List* list, int idx, GroundValue value);
#endif
#endif