One of the interesting things I remember about Nim is that you can have ptr 
object rather than ref object, since ptr object is not garbage collected. How 
do you create and destroy an ptr object? For example how do you correctly 
instantiate and destroy the two types below?
    
    
    type
      MyTypeA = ptr object of RootObj
        x: int64
      MyTypeB = ptr object of RootObj
        x: array[0..4, int64]
    
    
    Run

Reply via email to