summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-11-28 09:32:14 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-11-28 23:00:34 +0100
commit2dea9203791996f1c946c8f4708dc8ca5342180b (patch)
treea611a979b3b7f323fb1713a117a9afdda16b4f19 /lib
parent7e747d11c66405f08cc7c69e5afc18348663275e (diff)
downloadNim-2dea9203791996f1c946c8f4708dc8ca5342180b.tar.gz
ARC: implemented a simple cycle detector
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/asyncdispatch.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index d7d829742..43d2066e9 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -341,6 +341,8 @@ when defined(windows) or defined(nimdoc):
         addr lpNumberOfBytesTransferred, addr lpCompletionKey,
         cast[ptr POVERLAPPED](addr customOverlapped), llTimeout).bool
     result = true
+    when defined(gcDestructors):
+      GC_ref(customOverlapped)
 
     # http://stackoverflow.com/a/12277264/492186
     # TODO: http://www.serverframework.com/handling-multiple-pending-socket-read-and-write-operations.html