4 ms·
I like the koan. I was working on a closure implementation this weekend. When wondering how to clean up the captured variables in the closure, I realised that
by Ono-Sendai 11y ago
I like the koan.
I was working on a closure implementation this weekend. When wondering how to clean up the captured variables in the closure, I realised that the most natural way (to me at least) is effectively to store a 'destructor' pointer in the closure, which is very similar to the idea of a destructors and virtual methods in c++. As such I was enlightened :)
- prakashk 11y agohttp://www.c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent http://www.c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent