Back to index

lightning-sunbird  0.9+nobinonly
javaxfc.h
Go to the documentation of this file.
00001 # ifndef GC_H
00002 #   include "gc.h"
00003 # endif
00004 
00005 /*
00006  * Invoke all remaining finalizers that haven't yet been run.
00007  * This is needed for strict compliance with the Java standard, 
00008  * which can make the runtime guarantee that all finalizers are run.
00009  * This is problematic for several reasons:
00010  * 1) It means that finalizers, and all methods calle by them,
00011  *    must be prepared to deal with objects that have been finalized in
00012  *    spite of the fact that they are still referenced by statically
00013  *    allocated pointer variables.
00014  * 1) It may mean that we get stuck in an infinite loop running
00015  *    finalizers which create new finalizable objects, though that's
00016  *    probably unlikely.
00017  * Thus this is not recommended for general use.
00018  */
00019 void GC_finalize_all();
00020 
00021 /*
00022  * A version of GC_register_finalizer that allows the object to be
00023  * finalized before the objects it references.  This is again error
00024  * prone, in that it makes it easy to accidentally reference finalized
00025  * objects.  Again, recommended only for JVM implementors.
00026  */
00027 void GC_register_finalizer_no_order(GC_PTR obj,
00028                             GC_finalization_proc fn, GC_PTR cd,
00029                             GC_finalization_proc *ofn, GC_PTR * ocd);
00030 
00031 void GC_debug_register_finalizer_no_order(GC_PTR obj,
00032                             GC_finalization_proc fn, GC_PTR cd,
00033                             GC_finalization_proc *ofn, GC_PTR * ocd);
00034 
00035 #ifdef GC_DEBUG
00036 #   define GC_REGISTER_FINALIZER(p, f, d, of, od) \
00037        GC_debug_register_finalizer_no_order(p, f, d, of, od)
00038 #else
00039 #   define GC_REGISTER_FINALIZER(p, f, d, of, od) \
00040        GC_register_finalizer_no_order(p, f, d, of, od)
00041 #endif