I'm doing this way, but not working correctly.

Code:
void clean_log()
{
	//number of items in the list
int total = LBG_object_getnum(_listbox->item_first,LBG_object_last(_listbox));
	int ping; //for loop

	for(ping =0; ping < total; ping ++)
	{
           LBG_destroy_listitem(_listbox->item_first);
	   _listbox->item_first = _listbox->item_first->next;
	}
	
	
}



I believe the problem is the following reason:
I am destroying the ITEM before knowing what is next on the list.

LBG_destroy_listitem(_listbox->item_first);
_listbox->item_first = _listbox->item_first->next; ??????

know someone give me an idea?

Last edited by NeoNeper; 03/01/13 14:24.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________