Skip to content

Instantly share code, notes, and snippets.

@apahl
Created September 24, 2018 08:25
Show Gist options
  • Save apahl/6c87070db4996a66cd09a67d3c1527c3 to your computer and use it in GitHub Desktop.
Save apahl/6c87070db4996a66cd09a67d3c1527c3 to your computer and use it in GitHub Desktop.
where would the Table (not TableRef) inside a `ref object` be located? Stack or heap?
import tables
type MyObj = ref object
a: int
t: Table[int, int] # where would this table be located?
when isMainModule:
var obj = MyObj(a: 1, t: {1: 1, 2: 2}.toTable)
echo obj.t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment