Code review comment for lp:~pkunal-parmar/ubuntu-calendar-app/TimeLineView

Revision history for this message
Olivier Tilloy (osomon) wrote :

301 + function destroyAllChilds() {
302 + for(var i=0 ; i < children.length ; ++i ) {
303 + children[i].destroy(100);
304 + }
305 + }

Is there a good reason for specifying a delay of 100 msec before each child is destroyed?

Also, this loop is incorrect, as children are destroyed their length decreases, but the iterator keeps increasing, and will eventually become invalid. You need to do something like this:

  while (children.length > 0) {
    children[0].destroy()
  }

review: Needs Fixing

« Back to merge proposal