JS Barcode contains a memory leak.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
JS Barcode seems to be creating a memory leak.

I'm no expert, but I believe the problem lies in line 56 of this screen grab. You are referencing var API on line 43 which is global to window and the reference is never going away when the component re-renders. There needs to be some sort of cleanup to remove API on unmount. That's just my guess.

Contributor guide
Research direction
Start by locating the JS Barcode code corresponding to lines 43 and 56 in the screenshots, then reproduce repeated component renders in the browser and inspect whether the window-global API remains referenced. Confirm the lifecycle behavior and define done as cleanup occurring on unmount without breaking subsequent renders; no test file is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100