Fix mem leak when closing tabs introduced by move to OSWindow
This commit is contained in:
parent
2b988b01c6
commit
0bec6ea15d
@ -148,6 +148,7 @@ destroy_tab(Tab *tab) {
|
||||
for (size_t i = tab->num_windows; i > 0; i--) remove_window_inner(tab, tab->windows[ i - 1].id);
|
||||
remove_vao(tab->border_rects.vao_idx);
|
||||
free(tab->border_rects.rect_buf); tab->border_rects.rect_buf = NULL;
|
||||
free(tab->windows); tab->windows = NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
@ -170,6 +171,7 @@ destroy_os_window(OSWindow *w) {
|
||||
}
|
||||
Py_CLEAR(w->window_title); Py_CLEAR(w->tab_bar_render_data.screen);
|
||||
remove_vao(w->tab_bar_render_data.vao_idx);
|
||||
free(w->tabs); w->tabs = NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -470,7 +472,6 @@ static PyMethodDef module_methods[] = {
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
bool
|
||||
init_state(PyObject *module) {
|
||||
global_state.cell_width = 1; global_state.cell_height = 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user