Skip to content

Memory leak in chat #2928

@corrideat

Description

@corrideat

Problem

Following the discussion on #2927, I found a memory leak that affects both images and videos. This happens in ChatAttachmentPreview.vue, and these are the steps to reproduce (copied over from #2927):

  1. Sent a message with an image
  2. Opened that blob URL on a different tab (this works, which is great)
  3. Switched to the dashboard & opened a tab with that same URL (this still worked, and shouldn't have)
  4. Switched to the chatroom & I got a different blob URL (this is how it should be, but the other URL shouldn't be active)

The same happens with a video being shared.

Solution

Revoke URLs to prevent memory leaks. Maybe can be addressed at the same time as #2927 since that'll already require changing / refactoring the management logic for object URLs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions