uses __gc to invalidate messagePort on reload