parent
377f716766
commit
e6f0d4a5a5
4 changed files with 57 additions and 28 deletions
21
tests/arc/tasyncleak.nim
Normal file
21
tests/arc/tasyncleak.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
discard """
|
||||
outputsub: "(allocCount: 6013, deallocCount: 6007)"
|
||||
cmd: "nim c --gc:orc -d:nimAllocStats $file"
|
||||
"""
|
||||
|
||||
import asyncdispatch
|
||||
# bug #15076
|
||||
const
|
||||
# Just to occupy some RAM
|
||||
BigData = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
|
||||
proc doNothing(): Future[void] {.async.} =
|
||||
discard
|
||||
|
||||
proc main(): Future[void] {.async.} =
|
||||
for x in 0 .. 1_000:
|
||||
await doNothing()
|
||||
|
||||
waitFor main()
|
||||
GC_fullCollect()
|
||||
echo getAllocStats()
|
||||
Loading…
Add table
Add a link
Reference in a new issue