OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // Based on dartbug.com/7681 | 4 // Based on dartbug.com/7681 |
5 // Verify that context chains do not lead to unintended memory being held. | 5 // Verify that context chains do not lead to unintended memory being held. |
6 | 6 |
7 library closure_cycles_test; | 7 library closure_cycles_test; |
8 | 8 |
9 import "dart:async"; | 9 import "dart:async"; |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 y.onY = () { | 34 y.onY = () { |
35 y; // Capturing y can lead to endless context chains! | 35 y; // Capturing y can lead to endless context chains! |
36 doIt(); | 36 doIt(); |
37 }; | 37 }; |
38 }; | 38 }; |
39 } | 39 } |
40 | 40 |
41 void main() { | 41 void main() { |
42 doIt(); | 42 doIt(); |
43 } | 43 } |
OLD | NEW |