diff --git a/src/diskwriter.cxx b/src/diskwriter.cxx index 94d82d5..329edc4 100644 --- a/src/diskwriter.cxx +++ b/src/diskwriter.cxx @@ -199,5 +199,14 @@ int DiskWriter::writeSession() // clear the clipData, clean page for next save clipData.clear(); + + // reset the cJSON objects + cJSON_Delete( session ); + cJSON_Delete( sample ); + + session = cJSON_CreateObject(); + sample = cJSON_CreateObject(); + + return LUPPP_RETURN_OK; }