OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 0. | |
3 dart --observe retainingPath.dart | |
4 1. | |
5 isolate 'root' | |
6 2. | |
7 library 'retainingPath.dart' | |
8 3. | |
9 class 'Foo' | |
10 4. | |
11 under 'instances', find 'strongly reachable' list; it should contain 2 elements, one of which should have a field containing "87" | |
12 5. | |
13 instance "87" | |
14 6. | |
15 find 'retaining path'; it should have length 4, and be annotated as follows: | |
16 "87" in var a | |
17 Foo in var b | |
18 Foo at list index 5 of | |
19 _List(10) | |
20 */ | |
21 class Foo { | |
22 var a; | |
23 var b; | |
24 Foo(this.a, this.b); | |
25 } | |
26 | |
27 main() { | |
28 var list = new List<Foo>(10); | |
29 list[5] = new Foo(42.toString(), new Foo(87.toString(), 17.toString())); | |
30 while (true) {} | |
31 } | |
OLD | NEW |