repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[System] Tweak socket test
[mono-project.git]
/
mono
/
tests
/
finalize-parent.cs
blob
b784b2346d6878c61c3165fa5e380310aa341498
1
using
System
;
2
3
class
P
{
4
5
static public int
count
=
0
;
6
~
P
() {
7
count
++;
8
}
9
}
10
11
class
T
:
P
{
12
13
static int
Main
() {
14
for
(
int
i
=
0
;
i
<
100
; ++
i
) {
15
T t
=
new
T
();
16
}
17
GC
.
Collect
();
18
GC
.
WaitForPendingFinalizers
();
19
Console
.
WriteLine
(
P
.
count
);
20
if
(
P
.
count
>
0
)
21
return
0
;
22
return
1
;
23
}
24
}