@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
- Is this valid Nim code or a typo? Stefan_Salewski
- Re: Is this valid Nim code or a typo? Araq
- Re: Is this valid Nim code or a typo? dom96
- Re: Is this valid Nim code or a typo? jyapayne
- Re: Is this valid Nim code or a typo? Stefan_Salewski
- Re: Is this valid Nim code or a typo... mashingan
