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
[metadata] Fix leaks when handling a few attributes (#16675)
[mono-project.git]
/
mcs
/
tests
/
test-919.cs
blob
f5338e7beec11a53c6b058584f0bd3f6e7dd52f8
1
// Compiler options: -unsafe
2
3
class
Test
4
{
5
public static void
Main
(
string
[]
args
)
6
{
7
string
s
=
"hello, world!"
;
8
Outer
(
s
);
9
}
10
11
static void
Outer
(
string
s
)
12
{
13
unsafe
{
14
fixed
(
char
*
sp
=
s
) {
15
char
*
p
=
sp
;
16
Inner
(
ref
p
,
sp
);
17
}
18
}
19
}
20
21
static unsafe void
Inner
(
ref char
*
p
,
char
*
sp
)
22
{
23
++
sp
;
24
p
=
sp
;
25
}
26
}