Tim Blechmann <[email protected]> wrote: >> If there is one root_ptr per >> Javascript function then all local variables are guaranteed to be >> destroyed. And closures aren't too big of a deal either because child >> objects can easily refer to their parent. >> >> But returning local variables might need some work on root_ptr such as >> "unlisting" the variable from one set in order to "enlist" it to the >> parent set. > > how do you solve the situation that an object might be referenced by > multiple roots? >
Please elaborate because as far as I know variables in Javascript have a function scope and functions can be nested (waterfall parent-child hierarchy). So child functions can access the parent variables because the root_ptr of the child will be deleted before its parent. Thus all I need to do is: - add some implicit parameter to functions which will represent return variables - remove the ability of root_ptr from unifying with other sets Thanks, -Phil _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
