usually we are not expecting to have many instances of the same content (1-10 or something of that kind), so I think this loop does not create to many temporary objects.
But worth to concider using iterator also here