PGA3 Memory Leaks

Поиск
Список
Период
Сортировка
От efesar
Тема PGA3 Memory Leaks
Дата
Msg-id NGBBKFMOILMAGDABPFEGEEAHEEAA.efesar@nmia.com
обсуждение исходный текст
Ответы Re: PGA3 Memory Leaks  (Andreas Pflug <Andreas.Pflug@web.de>)
Список pgadmin-hackers
Andreas,

You made this change around line 347 in frmMain.cpp:

/*
    // Keith 2003.03.05
    // Fixed memory leak -- These are not destroyed automatically
       // Andreas 2003-04-08 yes they are, cascaded through the splitter!
        // GTK won't like explicit deletes.
    delete treeContextMenu;
    delete browserImages;
    delete statisticsImages;
    delete propertiesImages;
    delete statistics;
*/

I'm sorry, but this is incorrect.

1) Treecontextmenu does not get deleted automatically. It is a context menu,
and it never gets attached to the window. See the docs for wxWindow:

"Just before the menu is popped up, wxMenu::UpdateUI is called to ensure
that the menu items are in the correct state. The menu does not get deleted
by the window."

2) Imagelists do not get deleted automatically. It says that specifically in
the documentation for wxTreeCtrl.

"Sets the normal image list. Image list assigned with this method will not
be deleted by wxTreeCtrl's destructor, you must delete it yourself."

3) Statistics does not appear to need to be deleted.

Therefore, I've undone the change.

-Keith


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: PGA2: add Locks, fix depend
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: PGA3 Memory Leaks