From: sungwook79.park Date: Tue, 22 Aug 2017 06:23:23 +0000 (+0900) Subject: Initialize voidedata with new operation X-Git-Tag: accepted/tizen/4.0/unified/20170904.143710~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Finputdelegator.git;a=commitdiff_plain;h=2be8b14bbc2d7ad3c6ec19f782c6591538df0954 Initialize voidedata with new operation Change-Id: Ic191278ffd51bb6d2119e5a6eddcb8475352a037 Signed-off-by: sungwook79.park --- diff --git a/src/w-input-stt-ise.cpp b/src/w-input-stt-ise.cpp index 3dab87d..db786c4 100755 --- a/src/w-input-stt-ise.cpp +++ b/src/w-input-stt-ise.cpp @@ -44,7 +44,7 @@ void show_voice_input(Evas_Object *parent, const char *lang, void (*get_string)( //stt_feedback_initialize(); if (!my_voicedata) { - my_voicedata = (VoiceData*)malloc(sizeof(VoiceData)); + my_voicedata = new VoiceData; if (my_voicedata == NULL) { PRINTFUNC(DLOG_ERROR, "%d::::Heap Overflow, Voice Input cannot be shown!", __LINE__); return; diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index d39c87c..fb0c086 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -1800,7 +1800,7 @@ int init_voicedata(VoiceData *r_voicedata) voicedata->guide_text_timer = NULL; voicedata->btn_disabling_timer = NULL; voicedata->power_unlock_timer = NULL; - + voicedata->stt_results.clear(); voicedata->partial_result = NULL; voicedata->result_type = 0; voicedata->disclaimer = 1; @@ -2040,7 +2040,7 @@ void on_destroy(VoiceData *r_voicedata) voicedata->sttfeedback = NULL; } - free(voicedata); + delete voicedata; } }