☰
Debian Codegraph
@
1.5.5.8-1
/
/
src
/
test
/
01-Basic
/
227-dangle-ref-func2.ck
☽
☼
src/test/01-Basic/227-dangle-ref-func2.ck
code
plain
raw
GPL-2.0+
2004 Ge Wang and Perry R. Cook. All rights reserved.
debian/copyright
1
class Foo
2
{
3
int i;
4
}
5
6
fun void go( Foo foo )
7
{
8
if( Machine.refcount(foo) != 2 ) <<< "problem found" >>>;
9
}
10
11
Foo foo;
12
13
go( foo );
14
15
// test
16
if( Machine.refcount(foo) == 1 ) <<< "success" >>>;