Skip to content

Commit 05e66af

Browse files
authored
Merge pull request #705 from drowe67/ms-leak-cleanup
Resolve memory leak in FreeDV Reporter window.
2 parents 3296d16 + 804f855 commit 05e66af

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

USER_MANUAL.md

+1
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
895895
* Cache PortAudio sound info to improve startup performance. (PR #689)
896896
* Fix typo in cardinal directions list. (PR #688)
897897
* Shrink size of callsign list to prevent it from disappearing off the screen. (PR #692)
898+
* Clean up memory leak in FreeDV Reporter window. (PR #705)
898899
* Fix issue causing delayed filter updates when going from tracking band to frequency. (PR #704)
899900
2. Enhancements:
900901
* Add additional error reporting in case of PortAudio failures. (PR #695)

src/gui/dialogs/freedv_reporter.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ FreeDVReporterDialog::FreeDVReporterDialog(wxWindow* parent, wxWindowID id, cons
395395
FreeDVReporterDialog::~FreeDVReporterDialog()
396396
{
397397
m_highlightClearTimer->Stop();
398-
398+
delete m_highlightClearTimer;
399+
399400
m_trackFrequency->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(FreeDVReporterDialog::OnFilterTrackingEnable), NULL, this);
400401
m_trackFreqBand->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(FreeDVReporterDialog::OnFilterTrackingEnable), NULL, this);
401402
m_trackExactFreq->Disconnect(wxEVT_RADIOBUTTON, wxCommandEventHandler(FreeDVReporterDialog::OnFilterTrackingEnable), NULL, this);

src/pipeline/test/ExclusiveAccessTest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bool exclusiveAccessMethodsCalled()
2626
pVal[0] = 10000;
2727

2828
int outputSamples = 0;
29-
std::shared_ptr<short> input(pVal);
29+
std::shared_ptr<short> input(pVal, std::default_delete<short[]>());
3030
auto result = exclusiveAccessStep.execute(input, 1, &outputSamples);
3131

3232
if (outputSamples != 1)
@@ -66,4 +66,4 @@ int main()
6666
{
6767
TEST_CASE(exclusiveAccessMethodsCalled);
6868
return 0;
69-
}
69+
}

src/pipeline/test/LevelAdjustTest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ bool levelAdjustCommon(float val)
99
short* pData = new short[1];
1010
pData[0] = 10000;
1111

12-
auto result = levelAdjustStep.execute(std::shared_ptr<short>(pData), 1, &outputSamples);
12+
auto result = levelAdjustStep.execute(std::shared_ptr<short>(pData, std::default_delete<short[]>()), 1, &outputSamples);
1313
if (outputSamples != 1)
1414
{
1515
std::cerr << "[outputSamples[" << outputSamples << "] != 1]...";
@@ -41,4 +41,4 @@ int main()
4141
TEST_CASE(levelAdjustUp);
4242
TEST_CASE(levelAdjustDown);
4343
return 0;
44-
}
44+
}

src/pipeline/test/TapTest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bool tapDataEqual()
2525
short* pData = new short[1];
2626
pData[0] = 10000;
2727

28-
std::shared_ptr<short> input(pData);
28+
std::shared_ptr<short> input(pData, std::default_delete<short[]>());
2929
auto result = tapStep.execute(input, 1, &outputSamples);
3030
if (outputSamples != 1)
3131
{
@@ -51,4 +51,4 @@ int main()
5151
{
5252
TEST_CASE(tapDataEqual);
5353
return 0;
54-
}
54+
}

0 commit comments

Comments
 (0)