Changed x[i] to x.data[i] in 7th row of 1st snippet.
This commit is contained in:
parent
1c6640643b
commit
9133b1e23c
|
@ -34,7 +34,7 @@ written as:
|
||||||
|
|
||||||
proc `=destroy`*[T](x: var myseq[T]) =
|
proc `=destroy`*[T](x: var myseq[T]) =
|
||||||
if x.data != nil:
|
if x.data != nil:
|
||||||
for i in 0..<x.len: `=destroy`(x[i])
|
for i in 0..<x.len: `=destroy`(x.data[i])
|
||||||
dealloc(x.data)
|
dealloc(x.data)
|
||||||
x.data = nil
|
x.data = nil
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue