diff options
Diffstat (limited to 'lib/core')
-rw-r--r-- | lib/core/runtime_v2.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/core/runtime_v2.nim b/lib/core/runtime_v2.nim index 0165833b4..5689e3072 100644 --- a/lib/core/runtime_v2.nim +++ b/lib/core/runtime_v2.nim @@ -78,6 +78,13 @@ proc nimRawDispose(p: pointer) {.compilerRtl.} = proc nimDestroyAndDispose(p: pointer) {.compilerRtl.} = let d = cast[ptr PNimType](p)[].destructor if d != nil: cast[DestructorProc](d)(p) + when false: + cstderr.rawWrite cast[ptr PNimType](p)[].name + cstderr.rawWrite "\n" + if d == nil: + cstderr.rawWrite "bah, nil\n" + else: + cstderr.rawWrite "has destructor!\n" nimRawDispose(p) proc isObj(obj: PNimType, subclass: cstring): bool {.compilerproc.} = |