Fixed some memory leaks.

This commit is contained in:
David Capello 2009-07-27 03:15:31 +00:00
parent c384b6c19b
commit a67c563d6f
4 changed files with 7 additions and 1 deletions

View File

@ -237,6 +237,7 @@ static bool alert_msg_proc(JWidget widget, JMessage msg)
usprintf(buf, "In %d seconds the screen will be restored.", seconds_to_accept);
jwidget_set_text((JWidget)labels->end->next->next->data, buf);
jlist_free(labels);
if (seconds_to_accept == 0) {
jmanager_stop_timer(timer_to_accept);

View File

@ -133,6 +133,8 @@ void Console::printf(const char *format, ...)
jwidget_set_rect(wid_console, rect);
jwindow_center(wid_console);
jwidget_dirty(wid_console);
jrect_free(rect);
}
text = jwidget_get_text(wid_textbox);

View File

@ -52,9 +52,11 @@ void install_drop_files()
void uninstall_drop_files()
{
unsubclass_hwnd();
jmutex_free(dropped_files_mutex);
dropped_files_mutex = NULL;
dropped_files.clear();
}
void check_for_dropped_files()

View File

@ -541,6 +541,7 @@ static void combobox_close_window(JWidget widget)
ComboBox* combobox = reinterpret_cast<ComboBox*>(jwidget_get_data(widget, JI_COMBOBOX));
if (combobox->window) {
jwindow_close(combobox->window, widget);
jwidget_free(combobox->window);
combobox->window = NULL;
jmanager_remove_msg_filter(JM_BUTTONPRESSED, widget);