destructors: lift type bound ops to objects and arrays etc
This commit is contained in:
parent
a0c5260c20
commit
58d5f96790
4 changed files with 71 additions and 32 deletions
|
|
@ -4,7 +4,7 @@ foo bar to appendmore here
|
|||
foo bar to appendmore here
|
||||
foo bar to appendmore here
|
||||
foo bar to appendmore here
|
||||
after 16 16'''
|
||||
after 20 20'''
|
||||
cmd: '''nim c --newruntime $file'''
|
||||
"""
|
||||
|
||||
|
|
@ -92,5 +92,8 @@ proc main(n: int) =
|
|||
a.add c
|
||||
echo cstring(a.data)
|
||||
|
||||
var x: array[4, mystring]
|
||||
for i in 0..high(x): x[i] = create"added to array"
|
||||
|
||||
main(1000)
|
||||
echo "after ", allocCount, " ", deallocCount
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue