If you don't use WebRTC from C++, or don't remove tracks, you can stop reading now.
The signature of the RemoveTrack function was:
virtual bool RemoveTrack(RtpSenderInterface* sender)
This failed to return an error stating what the problem was, and did not require the caller to hold a reference to the sender being disconnected.
The new signature we want people to use is
virtual RTCError RemoveTrackOrError(
rtc::scoped_refptr<RtpSenderInterface> sender)
The addition of "OrError" is required because C++ doesn't permit overloading on return value.
The old function is now marked Deprecated, and will eventually be removed (no earlier than Jan 19, 2022).
Harald