| OLD | NEW |
| 1 /* | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 0. | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 dart --observe retainingPath.dart | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 1. | 4 |
| 5 isolate 'root' | 5 // See reatiningPath.txt for expected behavior. |
| 6 2. | 6 |
| 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 { | 7 class Foo { |
| 22 var a; | 8 var a; |
| 23 var b; | 9 var b; |
| 24 Foo(this.a, this.b); | 10 Foo(this.a, this.b); |
| 25 } | 11 } |
| 26 | 12 |
| 27 main() { | 13 main() { |
| 28 var list = new List<Foo>(10); | 14 var list = new List<Foo>(10); |
| 29 list[5] = new Foo(42.toString(), new Foo(87.toString(), 17.toString())); | 15 list[5] = new Foo(42.toString(), new Foo(87.toString(), 17.toString())); |
| 30 while (true) {} | 16 while (true) {} |
| 31 } | 17 } |
| OLD | NEW |