comparison nodejs/coord.cc @ 746:1dbc74a14199

Delete internal reference ob binding when invalidating coords and/or shapes
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 25 Aug 2010 14:48:39 +0800
parents 4ccb0553e804
children 56a5e08cd8af
comparison
equal deleted inserted replaced
745:4ccb0553e804 746:1dbc74a14199
79 FOR_COORDS_PREORDER(coord, child) { 79 FOR_COORDS_PREORDER(coord, child) {
80 child_hdl = (Persistent<Object> *)mb_prop_get(&child->obj.props, 80 child_hdl = (Persistent<Object> *)mb_prop_get(&child->obj.props,
81 PROP_JSOBJ); 81 PROP_JSOBJ);
82 SET(*child_hdl, "valid", _false); 82 SET(*child_hdl, "valid", _false);
83 WRAP(*child_hdl, NULL); 83 WRAP(*child_hdl, NULL);
84 delete child_hdl;
84 85
85 /* Invalidate members of a coord */ 86 /* Invalidate members of a coord */
86 FOR_COORD_SHAPES(child, mem) { 87 FOR_COORD_SHAPES(child, mem) {
87 mem_hdl = (Persistent<Object> *)mb_prop_get(&mem->obj.props, 88 mem_hdl = (Persistent<Object> *)mb_prop_get(&mem->obj.props,
88 PROP_JSOBJ); 89 PROP_JSOBJ);
89 SET(*mem_hdl, "valid", _false); 90 SET(*mem_hdl, "valid", _false);
90 WRAP(*mem_hdl, NULL); 91 WRAP(*mem_hdl, NULL);
92 delete mem_hdl;
91 } 93 }
92 } 94 }
93 } 95 }
94 96
95 /*! \brief Free C objects for coords and shapes in a subtree. 97 /*! \brief Free C objects for coords and shapes in a subtree.