Let’s say we have a UVM monitor instantiated inside of a UVM agent and we want to connect the analysis ports as shown in the image below:

Normally to connect these two, I would do the following in the connect_phase() of the agent:
my_agent_ap.connect(my_uvm_monitor.my_monitor_ap);
But in someone’s code I see him/her doing this:
//export port on monitor to the agent
my_agent_ap = my_uvm_monitor.my_monitor_ap;
It seems to work. I would rather that they do the former connection method. Are there any downsides to do the later method?