-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Nim Version
Version 2.2.4 [Linux: amd64]
also Version 2.3.1 [Linux: amd64]
Description
The issues #22398 looks still actual but with some small changes:
type InfoError* = object of ValueError
info*: string
proc newInfoError(info: string, parent: ref Exception): ref InfoError =
newException(InfoError, info, parent)
proc main() =
while true:
try:
try:
raise newException(ValueError, "msg")
except:
raise newInfoError("info", getCurrentException()) # leak
# raise newException(InfoError, "info", getCurrentException()) # no leak
except:
discard
echo getOccupiedMem()
main()Current Output
increasing getOccupiedMem
Expected Output
stable getOccupiedMem
Known Workarounds
No response
Additional Information
related to #22398