Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix ParabolicErodeDilateImageFilter progress memory leak, use stack #1180

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

N-Dekker
Copy link
Member

@N-Dekker N-Dekker commented Jul 2, 2024

Declaring ProgressReporter on the stack (instead of on the heap) may benefit run-time performance. But moreover, it fixes a memory leak.

Declaring `ProgressReporter` on the stack (instead of on the heap) may benefit run-time performance. But moreover, it fixes a memory leak.

- Corresponds with pull request richardbeare/parabolicMorphology#11 "BUG: Fix memory leaks by moving `progress` from the heap to the stack"
@N-Dekker N-Dekker merged commit d1e52fc into main Jul 2, 2024
7 of 8 checks passed
@N-Dekker N-Dekker deleted the ParabolicErodeDilateImageFilter-progress-leak branch July 2, 2024 10:58
@N-Dekker
Copy link
Member Author

N-Dekker commented Jul 2, 2024

Looks like there is more room for improvement:

  • Calculate NumberOfRows only for i = m_CurrentDimension, instead of for all dimensions
  • Replace m_MagnitudeSign and m_MagnitudeSign with local constexpr static variables
  • ...

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.

1 participant