Skip to content

Optimize icons#423

Merged
tsipinakis merged 3 commits into
dunst-project:masterfrom
bebehei:optimize_icons
Nov 2, 2017
Merged

Optimize icons#423
tsipinakis merged 3 commits into
dunst-project:masterfrom
bebehei:optimize_icons

Conversation

@bebehei
Copy link
Copy Markdown
Member

@bebehei bebehei commented Oct 31, 2017

Saving memory

  • Adds separate methods to free the RawImage and Actions structs
    • Found memory leak in Actions (the memory of the actual Actions sctruct is not freed)
  • Optimizing out icon_overridden
    • when icon_overridden is set, raw_icon is never used.
    • so freeing raw_icon saves additional memory and also saves the information of icon_overridden

There is no need save if the icon field should have precedence, as
setting raw_icon to NULL emphasizes the same.

Also freeing raw_icon saves unneccessary memory.
Also free the memory of the actual Action.
@bebehei bebehei requested a review from tsipinakis November 2, 2017 01:17
@tsipinakis tsipinakis merged commit 76857b6 into dunst-project:master Nov 2, 2017
@bebehei bebehei deleted the optimize_icons branch November 2, 2017 10:48
karlicoss pushed a commit to karlicoss/dunst that referenced this pull request Mar 21, 2019
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