Clicking on the debugger's close button causes the removal of the TabClose listener, before it gets a chance to run in order to disable the debugger. This should be causing memory leaks, but since there are already leaks present in the browser mochitests, I can't be sure. We definitely have to fix the cleanup sequence though.
This was fixed in: https://hg.mozilla.org/users/dcamp_campd.org/remote-debug/rev/8b07c3ebb8d4 I couldn't see any reduction in memory leaks, so I'm leaving the bug open in order to investigate it some more.
I filed bug 688705 to track the leaks, since it doesn't seem likely that they are related to this issue.