From e5af08cc1244640ca57e2cf64dd1633b1f5fae46 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sun, 21 Jan 2018 10:59:09 +0100 Subject: [PATCH] GC add 'string' to dumpNumberOfInstances --- lib/system/gc_common.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/system/gc_common.nim b/lib/system/gc_common.nim index 234b2c18a8..d117c17da6 100644 --- a/lib/system/gc_common.nim +++ b/lib/system/gc_common.nim @@ -38,6 +38,11 @@ when defined(nimTypeNames): if h == 1: break proc dumpNumberOfInstances* = + # also add the allocated strings to the list of known types: + if strDesc.nextType == nil: + strDesc.nextType = nimTypeRoot + strDesc.name = "string" + nimTypeRoot = addr strDesc var a: InstancesInfo var n = 0 var it = nimTypeRoot