seperate memory management from data format function
seperate memory management from data format function

now handled in a seperate function called `cleanup_data`

Mercotui/temperature_logger,Mercotui/temperature_logger,Mercotui/temperature_logger,Mercotui/temperature_logger