File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -772,7 +772,7 @@ observable_sealed_ptr<T> make_observable_sealed(Args&& ... args) {
772772 // Allocate memory
773773 constexpr std::size_t block_size = sizeof (block_type);
774774 constexpr std::size_t object_size = sizeof (T);
775- std::byte* buffer = new std::byte[ block_size + object_size] ;
775+ std::byte* buffer = reinterpret_cast < std::byte*>( operator new ( block_size + object_size)) ;
776776
777777 try {
778778 // Construct control block and object
@@ -784,7 +784,7 @@ observable_sealed_ptr<T> make_observable_sealed(Args&& ... args) {
784784 } catch (...) {
785785 // Exception thrown during object construction,
786786 // clean up memory and let exception propagate
787- delete[] buffer;
787+ delete buffer;
788788 throw ;
789789 }
790790}
You can’t perform that action at this time.
0 commit comments