If, for example, you have leaf spot, and 'compost" the remains...you just spread the fungus when you spread the compost. Borer eggs, and other "pests" can "travel" that way, as well. If you "hot compost, I would imagine that most, if not all the 'pests" would be eliminated.