slint icon indicating copy to clipboard operation
slint copied to clipboard

nodejs: Add a test for callback garbage collection

Open tronical opened this issue 2 years ago • 4 comments

Replaces #3772 Closes #3706

tronical avatar Nov 06 '23 16:11 tronical

Yes, at least I couldn't find it. But what's weird is that I don't quite understand how / why it works. But if the test looks sane to you, too, then that's the best thing we have for now to verify that we're not leaking.

tronical avatar Nov 06 '23 16:11 tronical

Is there a test that doesn't do demo = null? Because that's not what i'd expect in real code. I'd use demo.hide() and let demo go out of scope.

ogoffart avatar Nov 06 '23 17:11 ogoffart

Note to future self:

  1. Show
  2. GC should not collect
  3. Hide
  4. GC should collect

tronical avatar Nov 06 '23 17:11 tronical

Rebasing this first and then trying to find out why it passes in the CI (but fails, as expected locally).

tronical avatar Nov 28 '23 12:11 tronical