TLists Reporting Incorrect Counts?

BlitzMax Forums/BlitzMax Programming/TLists Reporting Incorrect Counts?

I would probably write in code where the TList is suppose to be 0, and dump the contents of the list. Something like this
If WhatListIsSupposeToContain = 0 And MyList.Count() <> 0
   For Local o:Object = Eachin MyList
      If o = Null
         Print "Null Object Found"
      Else
         Print "Object Found"
         If MyType(o) Then Print "And it is of Type MyType"
      End If
End If

If the list is truely empty, then nothing will print. If the list has a Null reference, then it'll print that. If it contains an object and it is one you added, then you'll know that.
If you discover that one of your own objects isn't being deleted, you might check the contents to find out which one.