mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
ref https://github.com/nim-lang/Nim/pull/24686 With this PR ```nim import std/streams proc foo() = var name = newStringStream("2r2") raise newException(ValueError, "sh") try: foo() except: discard echo 123 ``` this example no longer leaks --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
16 lines
218 B
Nim
16 lines
218 B
Nim
discard """
|
|
cmd: "nim c --mm:orc -d:useMalloc $file"
|
|
valgrind: "true"
|
|
"""
|
|
|
|
import std/streams
|
|
|
|
|
|
proc foo() =
|
|
var name = newStringStream("2r2")
|
|
raise newException(ValueError, "sh")
|
|
|
|
try:
|
|
foo()
|
|
except:
|
|
discard |