Skip to content

Conversation

@tbouffard
Copy link
Member

Add a dispose() method to properly release resources and clean up when a BpmnVisualization instance is no longer needed.

Key changes:

  • Add Disposable interface for objects that can free resources
  • Implement dispose() in BpmnVisualization to clean up graph and navigation resources
  • Add dispose() to NavigationImpl and ZoomSupport to properly remove event listeners
  • Prevent loading after disposal with clear error message
  • Add integration tests to verify dispose functionality

This is particularly useful for:

  • Removing BPMN diagrams from the page and freeing memory
  • Cleaning up or unmounting components that use BpmnVisualization
  • Preventing memory leaks from event listeners in long-running applications

Add a dispose() method to properly release resources and clean up when a BpmnVisualization instance is no longer needed.

Key changes:
- Add Disposable interface for objects that can free resources
- Implement dispose() in BpmnVisualization to clean up graph and navigation resources
- Add dispose() to NavigationImpl and ZoomSupport to properly remove event listeners
- Prevent loading after disposal with clear error message
- Add integration tests to verify dispose functionality

This is particularly useful for:
- Removing BPMN diagrams from the page and freeing memory
- Cleaning up or unmounting components that use BpmnVisualization
- Preventing memory leaks from event listeners in long-running applications
@tbouffard tbouffard added enhancement New feature or request lib integration Something about how an app can integrate the library labels Nov 15, 2025
@github-actions
Copy link

github-actions bot commented Nov 15, 2025

♻️ PR Preview 7929948 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@github-actions
Copy link

github-actions bot commented Nov 15, 2025

♻️ PR Preview 7929948 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@tbouffard tbouffard added the skip CI e2e tests GitHub Actions do not run e2e tests (for Pull Requests) label Nov 18, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lib integration Something about how an app can integrate the library skip CI e2e tests GitHub Actions do not run e2e tests (for Pull Requests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants