[cfe-dev] objc++ enhancements for new c++ features

James Gregurich via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 29 11:40:15 PDT 2018


John,


btw.   this  snippet demonstrates how I use my shared_ptr mechanism to great utility...


https://gist.github.com/bayoubengal/21757b0ddca12e594b4b0f93c65520a7


make_lambda_binding_sptr wraps KVO to create a KVO binding that is isn't fragile as they they are in pure objc. if the lambda gets called after the window controller has been dealloc'ed, the code just exists.



my purpose is to demonstrate that the mechanism isn't cumbersome for the developer to use. it is a little more verbose, but the benefits are worth the extra typing. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180329/723545f1/attachment.html>


More information about the cfe-dev mailing list