My favorites
▼
|
Sign in
hxcpp
Runtime files for c++ backend for haxe
Project Home
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
226
attachment: GarbageCollection.hx
(711 bytes)
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
// Try to force the garbage collector to run frequently just to ensure that it
// works
package;
class GarbageCollection
{
static var foo : Array<Dynamic>;
static function main()
{
var iter : Int = 1;
while (true) {
trace("Iteration " + iter++);
foo = new Array<Dynamic>();
for (i in 0...129) {
var arr = new Array<String>();
for (j in 0...1000) {
arr.push(new String(""));
}
var s : Int = 0;
for (j in 0...1000) {
arr[s] = new String("sdf");
}
foo.push(arr);
}
}
}
}
Powered by
Google Project Hosting