NS_RELEASE(child);
void DumpRects(){#ifdef XP_PC  nsRect rect;  // print the main window position  window->GetBounds(rect);  printf("Bounds(%d, %d, %d, %d)\n", rect.x, rect.y, rect.width, rect.height);  // print all children's position  nsIEnumerator *enumerator = window->GetChildren();  nsISupports * widget;  nsISupports * widget;  do {      if (!NS_SUCCEEDED(enumerator->CurrentItem(&widget))) {        return;      }      nsIWidget *child;      if (NS_OK == widget->QueryInterface(kIWidgetIID, (void**)&child)) {          //          child->GetBounds(rect);          printf("Bounds(%d, %d, %d, %d)\n", rect.x, rect.y, rect.width, rect.height);          NS_RELEASE(child);      }      NS_RELEASE(child);      NS_RELEASE(widget);  }  while (NS_SUCCEEDED(enumerator->Next()));  NS_RELEASE(enumerator);  delete enumerator;#endif}