diff --git a/support/hololens/ServoApp/strutils.h b/support/hololens/ServoApp/strutils.h index 22198332c90..4ebf8170075 100644 --- a/support/hololens/ServoApp/strutils.h +++ b/support/hololens/ServoApp/strutils.h @@ -13,7 +13,7 @@ std::wstring format(const std::wstring &txt, Args... args) { auto ptr = new wchar_t[size]; swprintf(ptr, size, txt.c_str(), args...); auto wstr = std::wstring(ptr); - delete ptr; + delete[] ptr; return wstr; }