Created
September 24, 2018 08:25
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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