summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-03-15 11:58:34 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-03-15 10:58:34 +0100
commit27c8efda9d2890b3a07773d39e80bfdb02534eb6 (patch)
tree0c747aa4ac630177594d8676cb07087d39552f40
parent51cd3bd86f73795056a051c05facb7b72685b204 (diff)
downloadNim-27c8efda9d2890b3a07773d39e80bfdb02534eb6.tar.gz
decTypeSize on growObj (#5465)
-rw-r--r--lib/system/gc.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index 66a5df73c..e37f601b4 100644
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -593,6 +593,7 @@ proc growObj(old: pointer, newsize: int, gch: var GcHeap): pointer =
             break
           dec(j)
       beforeDealloc(gch, ol, "growObj stack trash")
+      decTypeSize(ol, ol.typ)
       rawDealloc(gch.region, ol)
     else:
       # we split the old refcount in 2 parts. XXX This is still not entirely