Fixed mismatched `new[]` and `delete` by using a `std::unique_ptr` instead
Fixed mismatched `new[]` and `delete` by using a `std::unique_ptr` instead

realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core