Re: mem leaks win32 call_back
- Posted by mattlewis (admin) Feb 06, 2010
- 1237 views
And I don't see what use freeing callbacks would be in eu.ex. When would you free them? Why?
For the same reasons for freeing callbacks in general.
OK, so for callbacks in general: When would you free them? Why?
Sorry, maybe I missed it, or just not getting it. This is an honest question about how you would decide to free a callback. In what sort of situation would this be useful? If there's a good reason for it, it's definitely something we could do.
I haven't looked closely at the changes Shawn recently made, but I suppose there's no reason why we couldn't recycle the memory used for callbacks. But it would complicate the code, add places for us to write bugs, etc, and I just can't justify it, because it seems like something that's likely unsafe, and doesn't really do all that much for you. I'd be happy to be shown to be wrong here, though, because maybe there is something cool that can be done with it.
Matt