tobjectlist_clear.bmx 475 B

12345678910111213141516171819202122232425
  1. SuperStrict
  2. Framework Brl.ObjectList
  3. Import Brl.StandardIO
  4. ' create an object list to hold some objects
  5. Local list:TObjectList = New TObjectList
  6. ' add some string objects to the end of the list
  7. list.AddLast("one")
  8. list.AddLast("two")
  9. list.AddLast("three")
  10. ' print amount of elements in the list
  11. Print list.Count()
  12. ' clear the list and remove all elements
  13. list.Clear()
  14. ' print amount of elements in the list
  15. Print list.Count()
  16. ' outputs:
  17. ' 3
  18. ' 0