type
Data = tuple[x, y: int, s: string]
# allocate memory for Data on the heap:
var d = cast[ptr Data](alloc0(sizeof(Data)))
# create a new string on the garbage collected heap:
d.s = "abc"
# tell the GC that the string is not needed anymore: not sure why????
GCunref(d.s)
# free the memory:
dealloc(d)
dHlwZQogIERhdGEgPSB0dXBsZVt4LCB5OiBpbnQsIHM6IHN0cmluZ10KCiMgYWxsb2NhdGUgbWVtb3J5IGZvciBEYXRhIG9uIHRoZSBoZWFwOgp2YXIgZCA9IGNhc3RbcHRyIERhdGFdKGFsbG9jMChzaXplb2YoRGF0YSkpKQoKIyBjcmVhdGUgYSBuZXcgc3RyaW5nIG9uIHRoZSBnYXJiYWdlIGNvbGxlY3RlZCBoZWFwOgpkLnMgPSAiYWJjIgoKIyB0ZWxsIHRoZSBHQyB0aGF0IHRoZSBzdHJpbmcgaXMgbm90IG5lZWRlZCBhbnltb3JlOiBub3Qgc3VyZSB3aHk/Pz8/CkdDdW5yZWYoZC5zKQoKIyBmcmVlIHRoZSBtZW1vcnk6CmRlYWxsb2MoZCk=