- for(NodeContext c : children) updater.incRef(c);
- for(NodeContext c : this.children) updater.decRef(c);
+
+ final NodeContext[] currentChildren = this.children;
+
+ updater.execFromQuery(new Runnable() {
+
+ @Override
+ public void run() {
+ for(NodeContext c : children) updater.incRef(c);
+ for(NodeContext c : currentChildren) updater.decRef(c);
+ }
+
+ });