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
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'
David,
Thanks, that's good to know.
Thinking about explicitly deleting callbacks led me to ask whether each
ML function passed as a callback has its callback reused on subsequent
calls. If reuse occurs, the number of call sites in the source code
would bound memory usage.
I'm guessing that
On 27/01/2012 20:15, Phil Clayton wrote:
Thinking about explicitly deleting callbacks led me to ask whether each
ML function passed as a callback has its callback reused on subsequent
calls. If reuse occurs, the number of call sites in the source code
would bound memory usage.
I'm guessing that
On 29/01/12 15:57, David Matthews wrote:
On 27/01/2012 20:15, Phil Clayton wrote:
Thinking about explicitly deleting callbacks led me to ask whether each
ML function passed as a callback has its callback reused on subsequent
calls. If reuse occurs, the number of call sites in the source code
wou
On 01/02/12 10:44, Phil Clayton wrote:
On 29/01/12 15:57, David Matthews wrote:
On 27/01/2012 20:15, Phil Clayton wrote:
Thinking about explicitly deleting callbacks led me to ask whether each
ML function passed as a callback has its callback reused on subsequent
calls. If reuse occurs, the num