Skip to content

Fix memory leak on loadImage failure#8958

Merged
ksen0 merged 2 commits into
processing:mainfrom
gfrancine:main
Jun 25, 2026
Merged

Fix memory leak on loadImage failure#8958
ksen0 merged 2 commits into
processing:mainfrom
gfrancine:main

Conversation

@gfrancine

@gfrancine gfrancine commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

A follow-up to PR #8937, which resolved #8921. (I got an OK from @ksen0 for this follow-up after a discussion on Discord!)

Changes:

  • Revoke the blob object URL used by loadImage on an image loading error, which is previously only cleaned up on a successful load.
  • Added tests for ensuring all URL objects are properly cleaned up during loadImage regardless of implementation.

PR Checklist

@welcome

welcome Bot commented Jun 25, 2026

Copy link
Copy Markdown

🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors!
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
🌸 Once your PR is merged, be sure to add yourself to the list of contributors on the readme page !

Thank You!

@p5-bot

p5-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

Continuous Release

CDN link

Published Packages

Commit hash: df78f8f

Previous deployments

This is an automated message.

@ksen0 ksen0 merged commit 90f3cdd into processing:main Jun 25, 2026
5 checks passed
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.

[p5.js 2.0+ Bug Report]: loadImage cannot load SVG files

2 participants