Question about the underlying source core of Cinemachine in Unity2018


As show the red box in the pic, in cinemachine’s core code(CinemaineBrains), why it updates all active virtual cameras per frame in addition to the main live camera??
Wouldn’t that cause the main live camera to be updated twice per frame?
Personally, I think the code in the second red box can be removed.

Thanks for your interest in the code!

In fact there is a protection mechanism that prevents vcams from being updated more than once per frame, even if CinemachineCore.Instance.UpdateVirtualCamera is called more than once.

The reason that the code in the second red box is necessary is that it’s possible for the current active virtual camera to be inactive: for example, if it’s a timeline override. Therefore it’s necessary to update it just in case. It will do an early-out if it was already updated this frame.

Thanks for your answer!
1、I know the class CinemachineCore.UpdateStatus is about the protection mechanism that prevents vcams from being updated more than once per frame, but the logic code is a little complicated for me. I’m very interested in this implementation. Can you explain how it works? Thanks!!!
2、

I don’t understand this example.The current active virtual camera turn into disabled status so it will not be updated.
Maybe I don’t understand the all the source code frame very well, are there any other examples? Thanks!!!

Is there anyone who can help me? Thanks!