core/memory: Remove unnecessary memory zeroing in MemorySystem::Impl
std::make_unique for arrays is equivalent to doing: std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]()) (note the ending () after the array size specifier). This means that the default value within memory for the constructed types will be whatever the default constructor for that type does. Given the built-in type for std::uint8_t doesn't have a constructor, this is equivalent to forcing zero-initialization, so the memory will already be zeroed out on construction. Because of that, there's no need to zero it out again.master
parent
096e2a7ceb
commit
432e847c24
Loading…
Reference in New Issue