Skip to content

Memory leaks #374

@tester0077

Description

@tester0077

As part of my recent efforts to bring an old app of mine up-to-date and use the latest Firebird features,I ended up setting up a MSVC 2022 environment with wxWidgets 2.2.
Part of my earlier work was to include some of memory leak detection features available in MSVC.

When I first compiled and ran the FlameRobin code I noticed a good number of memory leaks reported when the app was shut down.
As I had a couple of hours time to instrument my test setup, I think I found at least some of the places where memory is allocated, but apparently not freed on exit.
Note: to avoid issues with line numbers, I will omit them in the hope that the rest of the information will provide enough context.

Since I simply don't know enough about the FR code, I will simply report the locations here and hope somebody more familiar with the code can find a suitable place to release the memory allocated with new at:


metadata - database.cpp 
void Database::loadTimezones()
{
      tzItm = new TimezoneInfo;       //  - leak
}
---------------------------------
config - localSettingd.cpp

LocalSettings::LocalSettings()
{
    locale = new wxLocale();        //---  leak
}

LocalSettings::~LocalSettings()
{
    locale = new wxLocale();        //--- leak
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions