@Stefan_Salewski, to further clarify, you could replace that code with the 
equivalent:
    
    
    proc onDestroy(p: pointer) =
      let x = cast[var T](p)
      `=destroy`(x.le)
      `=destroy`(x.ri)
      dealloc(p)
    
    proc `=destroy`(x: var T) =
      lazyDestroy(cast[pointer](x), onDestroy)
    
    
    Run

Reply via email to