ember-page-title icon indicating copy to clipboard operation
ember-page-title copied to clipboard

Install ember-cli-memory-leak-detector

Open steveszc opened this issue 4 years ago • 6 comments

This install ember-cli-memory-leak-detector

Congrats! No memory leaks were detected in this add-on (based on the coverage of the existing test suite)

PS This PR came out of the EmberConf contributor's workshop

steveszc avatar Mar 29 '21 17:03 steveszc

Looks like ember-canary is causing the PageTitleService to leak, I'm unsure what changed in canary to cause this. Open to ideas!

steveszc avatar Mar 29 '21 18:03 steveszc

Maybe the deprecation warning we see in the logs gives a hint here. I'll try see what exactly is deprecated.

I kicked CI for rerun to be sure it is not a one off issue.

raido avatar Mar 31 '21 16:03 raido

Looks like a consistent issue, and in beta too.

knownasilya avatar Mar 31 '21 17:03 knownasilya

It seems leak is coming from test setup only. In one test we create inline class for testing "titleDidUpdate" hook and that test leaks in beta and canary the mock class. (https://github.com/ember-cli/ember-page-title/blob/master/tests/acceptance/posts-test.js#L102)

Check out this diff - https://github.com/steveszc/ember-page-title/compare/ember-cli-memory-leak-detector...raido:ember-cli-memory-detector

By explicitly unregistering service:page-title leak disappears, I verified by checking heap retained objects as well.

Green CI run for 🔝 change - https://github.com/raido/ember-page-title/runs/2252988038

But not sure why in beta and canary this type of test setup introduces a leak in first place, maybe @rwjblue has any ideas?

raido avatar Apr 02 '21 10:04 raido

Good sleuthing @raido

knownasilya avatar Apr 02 '21 12:04 knownasilya

@rwjblue any ideas?

knownasilya avatar May 20 '21 18:05 knownasilya