useImperativeHandle

How does the useImperativeHandle hook handle the cleanup of exposed methods?