diff --git a/docs/changes.md b/docs/changes.md index e89b77d6b..2c4aecb39 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -1,4 +1,7 @@ # 最新动态 +* 2020/03/28 + * 修改 progress circle中的内存泄露。 + * 2020/03/27 * 完善 window\_base(感谢尧燊提供补丁)。 * 完善 main\_loop\_sdl2(感谢尧燊提供补丁)。 diff --git a/src/ext_widgets/progress_circle/progress_circle.c b/src/ext_widgets/progress_circle/progress_circle.c index be2888f73..ed5f6dfd7 100644 --- a/src/ext_widgets/progress_circle/progress_circle.c +++ b/src/ext_widgets/progress_circle/progress_circle.c @@ -176,6 +176,7 @@ static ret_t progress_circle_on_destroy(widget_t* widget) { return_value_if_fail(widget != NULL && progress_circle != NULL, RET_BAD_PARAMS); TKMEM_FREE(progress_circle->unit); + TKMEM_FREE(progress_circle->line_cap); return RET_OK; }