-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
58 lines (45 loc) · 879 Bytes
/
main.cpp
File metadata and controls
58 lines (45 loc) · 879 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include "GarbageCollector.h"
using namespace std;
int main() {
GCPtr<int> a;
for (int i = 0; i < 9000; i++) {
//a = new int(i);
a = new int[1000000];
}
/*
GCPtr<double, 10000> b;
for (int i = 0; i < 100000; i++) {
b = new double[10000];
if (i % 10000 == 0) b.collect();
}
GCPtr<double, 10000> z;
for (int i = 0; i < 100000; i++) {
z = new double[10000];
if (i % 10000 == 0) z.collect();
}
GCPtr<double, 10000000> c;
for (int i = 0; i < 100; i++) {
c = new double[10000000];
}
GCPtr<double, 10000000> c2;
for (int i = 0; i < 100; i++) {
c2 = new double[10000000];
}
system("pause");
a.collect();
b.collect();
c.collect();
z.collect();
c2.collect();
cout << "Gotowe" << endl;
a.shutdown();
b.shutdown();
c.shutdown();
z.shutdown();
c2.shutdown();
*/
system("pause");
a.collect();
system("pause");
}