> On Fri, May 4, 2012 at 9:43 AM, Goswin von Brederlow <goswin-v-b@...> wrote:
>> As discussed on irc you need to create your callbacks array as ocaml
>> block and register that itself as root. That also has the benefit that
>> you only have to register a single root instead of 50.
> Assuming that I have a class named MyCallbacks with a public member
> callbacks of type value, is this correct?
No. The callbacks can be public, protect, private or static. You
could also register the individual callbacks but then you need to
register and deregister all 50 of them seperate. Having just one makes
So the "need" above might be to strong. It is just simpler that way. And
I think the GC had some performance issues with too many roots.
> Also, can I use Is_block to check if there's a closure value stored in
> the callbacks block before I dispatch to the closure?