A tiny wrapper for TempleOS to automatically free allocated memory.
Write the contents of HolyGC.HC into a file called HolyGC.HC
in your own TempleOS machine, then just include the file into your project.
Assuming HolyGC.HC
is in the home directory:
#include "::Home/HolyGC.HC"
Which allows you to use the functions GCMAlloc
and GCClean
.
Same as MAlloc
but frees the block when GCClean
is called.
U8 *GCMAlloc(I64 size)
Frees every block allocated by GCMAlloc
.
U0 GCClean()