OpenImageIO/oiio — pull request #706 by lgritz (2013-10-19 21:55:19+00:00)
Title: Replace vector with scoped_array for better performance (no needless fill)

std::vector is helpful if you need to dynamically change size, but if you expect to only allocate once, it has a serious problem -- it fills the array right after allocation. If the very next things you're gonna do is copy something into it, that's just needless touching of memory. In such cases, it's really better to use a scoped_array, if the only point is to hold the one allocation and ensure that it's automatically deleted when it exits scope.