zynga/jsbindings — pull request #63 by colesbury (2013-03-09 20:58:35+00:00)
Title: Add JS roots for the function and the 'this' JSObject

Add JS roots for the function and the 'this' JSObject for the life of the callback.

Objective-C blocks create strong references to closed over objects. We
use this property to tie the lifetime of the JSB_Callback to the block's
lifetime. Once the block is dealloc'd, the JSB_Callback removes the JS
roots to the function and the 'this' JSObject.