bzr branch
http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
|
4
by Gustav Hartvigsson
Fixed a few problems. |
1 |
#include "SimpleTypeSystem.h" |
2 |
||
3 |
int main (char ** argc, int argv) { |
|
4 |
SBaseObjectInstance * obj = s_base_object_new (); |
|
5 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
6 |
|
|
7 |
s_base_object_ref (obj); |
|
8 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
9 |
|
|
10 |
s_base_object_ref (obj); |
|
11 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
12 |
|
|
13 |
s_base_object_ref (obj); |
|
14 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
s_base_object_unref (obj); |
|
19 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
20 |
|
|
21 |
s_base_object_unref (obj); |
|
22 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
23 |
|
|
24 |
s_base_object_unref (obj); |
|
25 |
fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
|
26 |
|
|
27 |
s_base_object_unref (obj); |
|
|
5.2.2
by Gustav Hartvigsson
Made sure -- using valgrind -- that the SBaseObjectInstance and |
28 |
//fprintf(stdout, "Refcount: %d\n", s_base_object_get_refcount (obj)); |
29 |
||
|
4
by Gustav Hartvigsson
Fixed a few problems. |
30 |
return 0; |
31 |
}
|