Re: Review patches regarding memory leaks in pgadmin fat client - Mailing list pgadmin-hackers
From | Sanket Mehta |
---|---|
Subject | Re: Review patches regarding memory leaks in pgadmin fat client |
Date | |
Msg-id | CA+yw=mNq=a7Ea3C+DWk1jCLjKhEWcqZP8eychKqDcZgk1o8WVg@mail.gmail.com Whole thread Raw |
In response to | Review patches regarding memory leaks in pgadmin fat client (Sanket Mehta <sanket.mehta@enterprisedb.com>) |
Responses |
Re: Review patches regarding memory leaks in
pgadmin fat client
|
List | pgadmin-hackers |
Hi Akshay,
PFA the patch for memory leaks found in pgadmin desktop client.
Below are the files modified and scenario in which this memory leak will occur.
1.pgadmin/frm/frmQuery.cpp:
2.pgadmin/gqb/gqbModel.cpp:
3.pgadmin/gqb/gqbView.cpp
Scenario:
After closing the graphic query builder dialog, memory leak occurred.
4.pgadmin/ogl/canvas.cpp:
Scenario:
This memory leak was found in OGL module as m_shapeDiagram was not being deleted in destructor of canvas class.
Please review this patch and let me know in case anything is missing.
Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb
On Thu, Dec 18, 2014 at 7:02 PM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi Akshay,PFA the patch to resolve memory leaks in pgadmin desktop client.Below are the files modified and scenario in which this memory leak will occur.1. pgadmin/dlg/dlgProperty.cpp:scenario 1:In table property dialog, memory leak occurs while filling the owner's combo box in properties tab as in dlgProperty::FillComboBox() function set was not being deleted.scenario 2:in Database property window, memory leak occurred while filling owner's combo box in properties tab as in dlgDefaultSecurityProperty::AddUsers() function set was not being deleted.2. pgadmin/dlg/dlgSelectDatabase.cpp:scenario 1:in step dialog, while selecting database output string using selection button, memory leak occurred as in dlgSelectDatabase::Initialize() function pgSet* res was not being deleted.scenario 2:in step dialog, while selecting the database output string using selection button, when trying to connect to any database, memory leak occurred as in dlgSelectDatabase::OnSelActivate() function pgSet* res was not being deleted.3. pgadmin/frm/frmEditGrid.cpp:scenario:While opening table data in grid view, memory leak occurred in sqlTable constructor as allColsSet was not being deleted4.pgadmin/utils/registry.cpp:scenario:while reading the registery at the start of the client, pBuf buffer was not being deleted after reading the registry value inside pgRegKey::QueryValue() function.5.pgadmin/utils/sysSettings.cpp:scenario:wxFileConfig* defaultSetting was not being deleted at the time of closing pgadmin.6.pgadmin/schema/pgTypes.cpp:Scenario:while expanding type node of composite type in object browser, memory leak occurred because pgSet* set was not deleted in pgType::ShowTreeDetails() function.7.pgadmin/schema/pgTrigger.cpp:scenario:while expanding trigger node in object browser, memory leak occurred because pgSet* res was not deleted in pgTrigger::ReadColumnDetails() function.8. pgadmin/schema/pgIndex.cpp:scenario:while expanding Index node in object browser, memory leak occurred because pgSet* res was not deleted in pgIndexBase::ReadColumnDetails() function.9.pgadmin/schema/pgAggregate.cpp:Scenario:While creating new aggregate function memory leak occurred because pgSet* types was not deleted in pgAggregateFactory::CreateObjects() function.10.pgadmin/debugger/debugger.cpp:scenario 1:while starting to debug a sql function in pgadmin, memory leak occurred because in debuggerFactory::startDialog() function pgSet* res was not deleted before any return statementscenario 2:While setting a break point in a sql function in pgadmin, memory leak occurred because in breakpointFactory::startDialog() function pgSet* res was not deleted before any return statement11.pgadmin/schema/gpExtTable.cpp:Scenario:At the time of getting the sql while creating/modifying/deleting the greenplum external Table memory leak occurred in function gpExtTable::GetSql() as pgSet* extTable was not being deleted before return statement.12.pgadmin/dd/ddmodel/ddDbReverseEngineering.cppScenario 1:While reverse engineering wizard is open, memory was occurred when moving from select table page as in function ddImportDBUtils::getTable() pgSet* inhtables was not deleted.and another memory leak was there as in functions ddImportDBUtils::getAllRelationships() and ddImportDBUtils::isModelSameDbFk() pgSet* foreignKeys was not deleted before return statement.Please review it and let me know if anything is missing.I will also send further patches in case i find more memory leaks.Regards,Sanket MehtaSr Software engineerEnterprisedb
Attachment
pgadmin-hackers by date: