Functions

objs/kite_gc.c File Reference

#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "kite_object.h"

Functions

kite_object_tkite_reference_object (kite_object_t *obj)
void kite_dereference_object (kite_object_t *obj)
kite_object_tkite_gc_incremental (kite_thread_t *thd)
void kite_gc_destroy_all (kite_thread_t *thd)

Function Documentation

void kite_dereference_object ( kite_object_t obj  ) 

Dereference object.

Parameters:
obj The object to dereference.
Note:
This has no effect if Kite was compiled with GC support. However, do not rely on the GC existing in a user's installed version. This is important to ensure that objects are freed appropriately and not leaked.

References kite_list_add_begin(), and kite_list_remove().

Referenced by kite_destruct_object_nofree(), kite_destruct_symtab(), kite_handle_signal(), kite_new_exception(), kite_set_property(), kite_symtab_insert(), kite_symtab_remove(), and kite_vm_call_method().

void kite_gc_destroy_all ( kite_thread_t *  thd  ) 
kite_object_t* kite_gc_incremental ( kite_thread_t *  thd  ) 
kite_object_t* kite_reference_object ( kite_object_t obj  ) 

Reference object.

Parameters:
obj The object to dereference.
Note:
This has no effect if Kite was compiled with GC support. However, do not rely on the GC existing in a user's installed version. This is important to ensure that objects are freed appropriately and not leaked.
Returns:
The given object.

References kite_object_t::inherit_from, kite_list_add_end(), kite_list_remove(), kite_reference_object(), and kite_object_t::object_data.

Referenced by kite_add_method(), kite_append_list(), kite_boolean_object(), kite_copy_symtab(), kite_copy_symtab_elements(), kite_float_object(), kite_get_property(), kite_int_object(), kite_list_object(), kite_new_boolean(), kite_new_class(), kite_new_instance(), kite_new_null(), kite_reference_object(), kite_set_arginfo(), kite_set_property(), kite_string_object(), and kite_vm_call_method().