Hi,
Is there really any special reason, for what
iupDlgListDestroyAll do not be like that?

--- a\src\iup_dlglist.c Tue Feb 13 11:05:14 2018
+++ b\src\iup_dlglist.c Tue Feb 13 11:11:25 2018
@@ -112,24 +112,9 @@
 
 void iupDlgListDestroyAll(void)
 {
-  int i = 0, count;
-  Ihandle** ih_array = (Ihandle**)malloc(idlg_count * sizeof(Ihandle*));
   Idiallst *list;
   for (list = idlglist; list; list = list->next)
   {
-    if (iupObjectCheck(list->ih))
-    {
-      ih_array[i] = list->ih;
-      i++;
-    }
+     IupDestroy(list->ih);   /* iupObjectCheck is called in IupDestroy */
   }
-
-  count = i;
-  for (i = 0; i < count; i++)
-  {
-    if (iupObjectCheck(ih_array[i]))
-      IupDestroy(ih_array[i]);   /* this will also destroy the list */
-  }
-
-  free(ih_array);
 }

Best regards,
Ranier Vilela
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to