Yeah, that is done in the function that owns it when the cue text token who owns it to begin with is deleted. Check it out [here](https://github.com/RickEyre/webvtt/blob/e59e9db691c5282468ff60aa84e547a4b1a2cbfc/src/libwebvtt/cuetext.c#L153).