list.clear or new?

Started by
20 comments, last by cache_hit 14 years, 1 month ago
i meant the GC dosent need to zero the array so its faster!
thats it i just meant its faster! not that ill go in and see what it leaves behind!
Advertisement
Maybe but if you use .clear it doesnt have to GC anything anyway so youre just trading one thing for another.

Anyway if were just discussing this on the grounds of it being interesting or wanting to learn more thats fine but i dont think you sjould be worrying about it in your code because its unlikely to be the bottleneck

This topic is closed to new replies.

Advertisement