clipboard-polyfill icon indicating copy to clipboard operation
clipboard-polyfill copied to clipboard

`overwrite-globals` build triggers a memory leak in Firefox

Open tommoor opened this issue 1 year ago • 3 comments

I thought users of this library should be aware that it causes a memory leak in Firefox as they do not properly garbage collect the clipboard object, although a patch is in the works.

See more details on Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1886056

tommoor avatar Mar 19 '24 01:03 tommoor

Interesting, thanks for sharing!

Do you know why the overwrite-globals version of the library was used? It's generally much better to use the ponyfill when possible.

lgarron avatar Mar 19 '24 06:03 lgarron

I do not, presumably for ease though as it's a large codebase and hard to ensure that other engineers are aware of Firefox limitations

tommoor avatar Mar 19 '24 10:03 tommoor

This issue is now addressed in Firefox Nightly build, feel free to close it out – I just wanted to make sure that anyone searching would know about the limitation.

tommoor avatar Mar 20 '24 16:03 tommoor