summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tarc.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/destructor/tarc.nim b/tests/destructor/tarc.nim
index 5c78605d2..25921ffd7 100644
--- a/tests/destructor/tarc.nim
+++ b/tests/destructor/tarc.nim
@@ -82,6 +82,16 @@ proc inheritanceBug(param: string) =
   s[0] = B(more: "a" & param)
   s[1] = B(more: "a" & param)
 
+
+type
+  PAsyncHttpServer = ref object
+    value: string
+
+proc serve(server: PAsyncHttpServer) = discard
+
+proc leakObjConstr =
+  serve(PAsyncHttpServer(value: "asdas"))
+
 let startMem = getOccupiedMem()
 take3()
 tlazyList()
@@ -89,4 +99,5 @@ inheritanceBug("whatever")
 mkManyLeaks()
 tsimpleClosureIterator()
 tleakingNewStmt()
+leakObjConstr()
 echo getOccupiedMem() - startMem
16:22:47 -0700 add libcurl and libsdl1 headers' href='/ahoang/Nim/commit/.travis.yml?h=devel&id=517312467eb5be2406572384aaa3c75f7bb4a532'>517312467 ^
1d00f7f9d ^
517312467 ^


e5aefbd1d ^
911551aae ^
223e65e52 ^

1d00f7f9d ^
8f6a275f4 ^
fbe7bf3c8 ^
1d00f7f9d ^

c60916a2a ^
a01fd5e93 ^
aa0a9dd78 ^
a01fd5e93 ^
aa0a9dd78 ^
7d07897a9 ^





308710c1e ^



7d07897a9 ^
2e5c75973 ^
308710c1e ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52