ptr1 = NS_STATIC_CAST(wallet_Sublist*, ptr->itemList->ElementAt(i2)); delete ptr1;
sublistPtr = NS_STATIC_CAST(wallet_Sublist*, mapElementPtr->itemList->ElementAt(i2)); delete sublistPtr;
wallet_Clear(nsVoidArray ** list) {  wallet_MapElement * ptr;  wallet_Sublist * ptr1;  PRInt32 count = LIST_COUNT((*list));  for (PRInt32 i=count-1; i>=0; i--) {    if (*list == wallet_DistinguishedSchema_list) {      ptr1 = NS_STATIC_CAST(wallet_Sublist*, (*list)->ElementAt(i));      (*list)->RemoveElement(ptr1);      delete ptr1;    } else {      ptr = NS_STATIC_CAST(wallet_MapElement*, (*list)->ElementAt(i));      PRInt32 count2 = LIST_COUNT(ptr->itemList);      for (PRInt32 i2=0; i2<count2; i2++) {        ptr1 = NS_STATIC_CAST(wallet_Sublist*, ptr->itemList->ElementAt(i2));        delete ptr1;      }      delete ptr->itemList;      (*list)->RemoveElement(ptr);      delete ptr;    }  }  *list = 0;}