Skip to content

main: bugfix/exc memleak#51

Merged
c-randall merged 4 commits intomainfrom
bugfix/exc-memleak
Mar 24, 2026
Merged

main: bugfix/exc memleak#51
c-randall merged 4 commits intomainfrom
bugfix/exc-memleak

Conversation

@c-randall
Copy link
Copy Markdown
Collaborator

Description

Addresses issue #49, where memory leaks occur when exceptions are raised. The problem seemed to be caused by catching the exception in the AuxData class to re-raise inside other functions. Instead of storing the exception in an object to pass around it is now simply created as a local variable in a new _pyerr_handler() function and re-raised within the error handler.

This fix has also been applied to the v1.1.x branch and v1.1.3 will be released from that branch soon.

Fixes #49

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that improves speed/readability/etc.)
  • Bug fix (non-breaking change which fixes an issue)
  • Chore (any other clean up, maintenance, etc.)

Key checklist

  • No style issues: $ nox -s linter [-- format]
  • Code is free of misspellings: $ nox -s codespell [-- write]
  • All tests pass: $ nox -s tests
  • Badges are updated: $ nox -s badges

Further checks:

  • The documentation builds: $ nox -s docs.
  • Code is commented, particularly in hard-to-understand areas.
  • Tests are added that prove fix is effective or that feature works.

@c-randall c-randall marked this pull request as ready for review March 24, 2026 14:54
@c-randall c-randall merged commit 91aee4f into main Mar 24, 2026
10 checks passed
@c-randall c-randall deleted the bugfix/exc-memleak branch March 24, 2026 14:55
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.

[Bug]: memory leaks on caught exceptions

1 participant