7 |
automatically reclaimed when no one is using this string any longer. |
automatically reclaimed when no one is using this string any longer. |
8 |
This can work because Guile knows enough about its objects at run-time |
This can work because Guile knows enough about its objects at run-time |
9 |
to be able to trace all references between them. Thus, it can find |
to be able to trace all references between them. Thus, it can find |
10 |
all 'life' objects (objects that are still in use) by starting from a |
all 'live' objects (objects that are still in use) by starting from a |
11 |
known set of 'root' objects and following the links that these objects |
known set of 'root' objects and following the links that these objects |
12 |
have to other objects, and so on. The objects that are not reached by |
have to other objects, and so on. The objects that are not reached by |
13 |
this recursive process can be considered 'dead' and their memory can |
this recursive process can be considered 'dead' and their memory can |
14 |
be used for new objects. |
be reused for new objects. |
15 |
|
|
16 |
When you are programming in Scheme, you don't need to worry about the |
When you are programming in Scheme, you don't need to worry about the |
17 |
garbage collector. When programming in C, there are a few rules that |
garbage collector. When programming in C, there are a few rules that |
67 |
@code{free}. |
@code{free}. |
68 |
|
|
69 |
There is also @code{scm_gc_realloc} and @code{scm_realloc}, to be used |
There is also @code{scm_gc_realloc} and @code{scm_realloc}, to be used |
70 |
in place of @code{realloc} when appropriate. |
in place of @code{realloc} when appropriate, @code{scm_gc_calloc} and |
71 |
|
@code{scm_calloc}, to be used in place of @code{calloc} when |
72 |
|
appropriate. |
73 |
|
|
74 |
For really specialized needs, take at look at |
For really specialized needs, take at look at |
75 |
@code{scm_gc_register_collectable_memory} and |
@code{scm_gc_register_collectable_memory} and |