What happened?
When editing a prompt and changing the image multiple times, each new image creates a new object URL via URL.createObjectURL(file), but the previous URLs are never cleaned up. This causes a memory leak that accumulates over time.
Steps to reproduce
- Open any prompt you own and click Edit
- Change the image 5-10 times in succession
- Open browser DevTools > Memory > Take heap snapshot
- Search for "blob:" — you'll see multiple unreleased object URLs
Where did you see this?
On parostudios.in
Console errors
In `src/components/prompts/EditPromptModal.tsx:68-74`:
const handleImageChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
if (file) {
setImageFile(file);
setImagePreview(URL.createObjectURL(file)); // Previous URL never revoked
}
};
Browser and OS
No response
What happened?
When editing a prompt and changing the image multiple times, each new image creates a new object URL via
URL.createObjectURL(file), but the previous URLs are never cleaned up. This causes a memory leak that accumulates over time.Steps to reproduce
Where did you see this?
On parostudios.in
Console errors
Browser and OS
No response