as we know, string in nim is value type, but i do not know the type of cstring. so i wrote a snippet:
var y = "abc"
let z = cstring(y)
y.add("d")
# when mm:arc
# assert y == "abcd"
# assert z == cstring"abc"
# when mm:refc
assert y == "abcd"
assert z == cstring"abcd"
ps: this question was originated from this pr that says there is a memory leak with cstring.