Sie zerstören die Memory nie, da sie keinen Dekonstruktor haben. Daher entsteht hier ein Memory leak, weil die Ressourcen nicht mehr freigegeben werden.
"An object created by 'new' lives until destroyed by delete" - Bjarne Stroustrup, A Tour of C++
Ich schlage vor einfach das new weg zu lassen und die (de)allocation RAII zu überlassen.
https://github.com/smart-swimmingpool/pool-controller/blob/97b6b59d9d36d87e5567086f0d6f9f531a3b8d4a/src/DallasTemperatureNode.cpp#L28-L29
Sie zerstören die Memory nie, da sie keinen Dekonstruktor haben. Daher entsteht hier ein Memory leak, weil die Ressourcen nicht mehr freigegeben werden.
"An object created by 'new' lives until destroyed by delete" - Bjarne Stroustrup, A Tour of C++
Ich schlage vor einfach das new weg zu lassen und die (de)allocation RAII zu überlassen.
Ich würde auch raten das überall zu ändern.