Just today (re)discovered FinalizationRegistry which is a big help if you are worried about what may be left behind. It's quite nice to be able to see a log of objects disappearing.
It's frustrating sometimes waiting for GC to kick in. The Chrome debugger seems to offer a GC now thing, but either it didn't work or it's just a kind of suggestion.