steveszc / ember-cli-memory-leak-detector

Automatic memory leak detection for ember apps
https://www.npmjs.com/package/ember-cli-memory-leak-detector
MIT License
38 stars 5 forks source link

False positive memory leaks #2

Closed steveszc closed 4 years ago

steveszc commented 4 years ago

Running ember test --filter="nonleaky" is reporting a false positive memory leak. When manually taking a heapsnapshot running ember test --server --filter="nonleaky" you can see that the Container is being retained. Unclear why the container is leaking in what should be a leak-free piece of code.

The retainer indicates that this may be due to some ember framework code. Unclear if this code will cause leaks in production mode, but I don't beleive we have the ability to run tests on a production build of the app.

steveszc commented 4 years ago

I verified that a heapshot producing false positives in our logic does not show memory leaks (retained Container or NonleakyService class when loading that snapshot into dev tools. We need to update the way we are finding leaks in the snapshot, apparently search the snapshot's strings array is not a correct way to identify retained objects.

steveszc commented 4 years ago

Fixed by 0534133f61f9ce1eca1ecfc2f3568e28402b17c3