Hi,

Based on my experience, I will not use ALLOC unless it is necessary
because of the Ruby gc overhead.  Based on what I have learned, when I
write Ruby in C, I will stay away from Ruby gc as far as possible (please
also see my response to Guy).  Thanks.

Regards,

Bill
======================================================================
Christian Boos <cboos / bct-technology.com> wrote:
> my two cents on that issue:

>>     ptr->data2 = Qnil;
>>     ptr->data2 = Data_Make_Struct (cInner...);
>>     ....

> To me, this doesn't look funny, this looks just THE right thing to do:
> secure already existing data structures reachable from the GC
> before possibly triggering the GC. 

> Maybe some more information about this issue in README.ext wouldn't hurt,
> but I don't want a restricted,  "safer"  C API.
> For instance, ALLOC is an useful wrapper on top of malloc,
> because if needed, it can free memory by triggering a GC.

> -- Christian