diff --git a/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp b/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp index 5f75cc2143bdf9..15fa68ddd1bc4c 100644 --- a/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp @@ -25,8 +25,9 @@ #include #include "CHIPDeviceManager.h" -#include #include +#include +#include #include namespace chip { @@ -77,6 +78,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) break; } + err = Platform::MemoryInit(); + SuccessOrExit(err); + // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast(cb));