The patch adds a missing |delete|. (This leak only occurred when the "mainthreadio" feature was enabled, which is not the default.) The patch also makes the unregistering of the interpose observer conditional on there being one in the first place, avoiding a harmless but useless unregistering of |nullptr|.
Created attachment 8859784 [details] [diff] [review] Don't leak ProfilerIOInterposeObserver
https://hg.mozilla.org/integration/mozilla-inbound/rev/1b37b1ed3bc1013a5b8e1f062ceeb3b0f4dd0182 Bug 1357936 - Don't leak ProfilerIOInterposeObserver. r=mstange.