@PMunch, sorry I don't understand , when you do this :
var testTable: Table[string, MyObj]
proc populateTable() =
testTable["key1"] = MyObj(age: 42)
testTable["key2"] = MyObj(age: 32)
Run
You are populating your table with objects, but imagine that I have 10,000
objects ("key1", "key2" ... "key10000"). My memory will increase.
Maybe I didn't understand your first answer (probably), but my goal is not to
store my objects, but only a reference, an address... something that would
allow me to find it through my table so I can use it again later.