The critical thickness constitutes a vital parameter in heterostructure epitaxy engineering as it determines the limit where crystal coherency is lost. By finite element modeling of the total strain relaxation in finite size heterostructure nanowires, we show that the equilibrium configuration changes abruptly at the critical thickness from a fully elastically strained structure to a structure with a network of MDs. We show how the interdependent MD relaxation changes as a function of the lattice mismatch. These findings suggest that a collective formation of MDs takes place when the growing heterostructure layer exceeds the critical thickness.