What’s the best way to iterate through an owned array while deleting part of the elements? In the following code it could crash. As I assume the iterator is invalid after one element is deleted:
for (auto s: myOwnedArray)
{
if (condition is true)
myOwnedArray.removeObject (s);
}