Think in wifi, your application sends a packet that is encapsulate in TCP/Udp ->IP->Ieee80211 and you need to make a copy for every node because the network is broadcast, but only a node will process the 80211 frame. With the ref count you only need to make the copy of the Ieee frame, for every node but you don’t need initially, to make a copy of all the encapsulated packets, all the nodes, except the destination will delete the 802.11 frame, if you do the whole copy, you need to duplicate all the encapsulated packets that will be deleted immediately after the arrival, in this case you will have a waste of time. You waste time creating copy that are useless and waste time deleting these useless copies.
// Duplicate message and send the copy. cMessage *copy = (cMessage *) msg->dup(); send(copy, "out");