mirror of
https://github.com/dart-lang/sdk
synced 2024-09-22 05:41:18 +00:00
6b4f4b1bab
Deprecate List.fixedLength, add List.filled. Make Iterable.toList and List.from take "growable" argument, defaulting to false. Review URL: https://codereview.chromium.org//12328104 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
21 lines
549 B
Dart
21 lines
549 B
Dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
// Testing GC, issue 1469.
|
|
|
|
|
|
main() {
|
|
var div;
|
|
for (int i = 0; i < 200; ++i) {
|
|
List l = new List(1000000);
|
|
var m = 2;
|
|
div = (_) {
|
|
var b = l; // Was causing OutOfMemory.
|
|
};
|
|
var lSmall = new List(3);
|
|
// Circular reference between new and old gen objects.
|
|
lSmall[0] = l;
|
|
l[0] = lSmall;
|
|
}
|
|
}
|