[Ecls-list] allocation, GC, explicit destruction and finalizers

Matthew Mondor mm_lists at pulsar-zone.net
Tue Feb 8 21:55:26 UTC 2011


Hello,

I would like confirmation, or correction, about these following details:

- Memory custom-allocated using ecl_alloc() or ecl_alloc_align() in
  C-inline code will automatically get garbage collected if no longer
  referenced
- If a finalizer is wanted at GC collect/destruction time,
  si_set_finalizer() can be called with the cl_object of the foreign
  pointer and the cl_object of a custom finalizer function which will
  be called by the GC before such memory is reclaimed
- If wanted, ecl_delloc() may be used to haste destruction of an
  allocated object, and any custom registered finalizer will also
  automatically/implicitely be called

Thanks,
-- 
Matt




More information about the ecl-devel mailing list