Skip to content

Fix some memory leaks - #3779

Merged
lukas-w merged 2 commits into
stable-1.2from
fix/memory-leaks
Aug 28, 2017
Merged

Fix some memory leaks#3779
lukas-w merged 2 commits into
stable-1.2from
fix/memory-leaks

Conversation

@lukas-w

@lukas-w lukas-w commented Aug 27, 2017

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/core/Song.cpp Outdated
QString Song::errorSummary()
{
QString* errors = new QString();
QString errors = m_errors.join('\n') + '\n';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constructor of QString expects a const char* here. Change the '\n's to "\n" to make them string literals.

@lukas-w lukas-w Aug 27, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, although it's the join function that expects const char*, not the constructor. Appears to be a Qt5-only feature.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed via 670ca4f

@lukas-w
lukas-w merged commit 24d320d into stable-1.2 Aug 28, 2017
@lukas-w
lukas-w deleted the fix/memory-leaks branch August 28, 2017 09:21
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants