Skip to content

Instantly share code, notes, and snippets.

@obadz

obadz/test.nim Secret

Created September 10, 2017 22:02
Show Gist options
  • Save obadz/c331c7657de7877c58658d04c1e4e56c to your computer and use it in GitHub Desktop.
Save obadz/c331c7657de7877c58658d04c1e4e56c to your computer and use it in GitHub Desktop.
proc final(x: ref int) =
echo x[], " was destroyed"
proc main() =
var a : ref int
new(a, final)
a[] = 5
echo a[]
echo "Main is done"
main()
echo "After main"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment