You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeSocketObj=objectSocket=refSocketObjAsyncSocketObj=distinctSocketObjAsyncSocket=refAsyncSocketObjproc`=destroy`(s: varSocketObj) =echo"Destroying Socket"proc`=destroy`(s: varAsyncSocketObj) =echo"Destroying AsyncSocket"procnewSocket(): Socket=Socket()
procnewAsyncSocket(): AsyncSocket=AsyncSocket(newSocket())
procmain() =var x =newSocket()
var y =newAsyncSocket()
x =nil
y =nilGC_fullCollect()
main()
Current Output
Destroying Socket
Destroying Socket
Expected Output
Destroying Socket
Destroying AsyncSocket
Additional Information
Behaves correctly with --gc:arc
Found during development of nim-sys
$ nim -v
Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2021-11-08
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 83a9c3ba31d180cd5e31026d8b7603bf7adea18c
active boot switches: -d:release -d:nimUseLinenoise
The text was updated successfully, but these errors were encountered:
Example
Current Output
Expected Output
Additional Information
--gc:arc
nim-sys
The text was updated successfully, but these errors were encountered: