the documentation does not really mention how to delete a window or a panel;
the c api of curses has delwin
and del_panel
functions, but neither is available in the python api; does this mean the correct way of deleting a window in python is to simply unlink all references to it and let it be garbage collected? does the same apply to a panel?
the only place i found del_panel
is called in the python curses.panel
module is in the deallocator:
static void
PyCursesPanel_Dealloc(PyCursesPanelObject *po)
{
PyObject *obj = (PyObject *) panel_userptr(po->pan);
if (obj) {
(void)set_panel_userptr(po->pan, NULL);
Py_DECREF(obj);
}
(void)del_panel(po->pan);
if (po->wo != NULL) {
Py_DECREF(po->wo);
remove_lop(po);
}
PyObject_DEL(po);
}