Phil,
Currently, callbacks remain in effect for ever and are never garbage-collected. I've certainly come across cases where I would want a callback to remain in effect after the function that passed it in had returned. For example, the window procedure in RegisterClassEx in Windows. I don't know if there should be some way to delete a callback explicitly.

Regards,
David

On 27/01/2012 17:47, Phil Clayton wrote:
I have been assuming that the pointer back to an ML function passed to a
foreign C function will still be valid after the C function has
returned, so the callback can occur sometime later (from a different C
function). Is that a valid assumption?

I made this assumption based on some tests in which one such callback
pointer remained valid for the life of the application. It would be nice
to know I wasn't just being (un)lucky!

Phil
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to