source:
tests/zombies/gc_no_raii/test/gctest.c
@
793eb2f
Last change on this file since 793eb2f was 87b9332, checked in by , 4 years ago | |
---|---|
|
|
File size: 351 bytes |
Rev | Line | |
---|---|---|
[73abe95] | 1 | #include <fstream.hfa> |
[15db1ab] | 2 | |
3 | #include "gc.h" | |
[6643e72] | 4 | #include "internal/collector.h" |
[15db1ab] | 5 | |
[9421588a] | 6 | #warning default test |
7 | ||
[15db1ab] | 8 | int main() { |
9 | sout | "Bonjour au monde!\n"; | |
[bee4283] | 10 | |
[6643e72] | 11 | gcpointer(int) theInt; |
12 | gcmalloc(&theInt); | |
13 | ||
14 | for(int i = 0; i < 10; i++) { | |
15 | int a; | |
16 | { | |
17 | gcpointer(int) anInt; | |
18 | gcmalloc(&anInt); | |
19 | } | |
20 | int p; | |
[e297ceb] | 21 | } |
[6643e72] | 22 | |
23 | gc_collect(gc_get_state()); | |
24 | gc_conditional_collect(); | |
[15db1ab] | 25 | } |
Note: See TracBrowser
for help on using the repository browser.