Topic: Issue with RemoveByTag
In OnlineMapsMarkerManagerBase.cs, the RemoveByTag has
RemoveAll(m =>
{
for (int j = 0; j < tags.Length; j++) if (m.tags.Contains(tags[j])) return true;
return false;
});
In the "RemoveAll" method, the default for "dispose" is true, so it will go through the predicate sent from above and call Dispose on each element. The Dispose method for the map markers does
tag = null
This poses a problem in the next line of the RemoveAll method that does
items.RemoveAll(match)
this again calls the predicate, but this time "m.tags.Contains..." will throw a null error.
It seems more efficient to instead have the RemoveAll method be something like this ...
List<U> matchingItems = items.FindAll(match);
foreach (U item in matchingItems)
{
items.Remove(item);
if(dispose)
{
item.Dispose();
}
}
Redraw();
We heavily use tags and this is killing our port to v3!
Thanks!
-m