SB 3.3.22

tasyaivaṁ ramamāṇasya
 saṁvatsara-gaṇān bahūn
gṛhamedheṣu yogeṣu
 virāgaḥ samajāyata
Synonyms: 
tasya — His; evam — thus; ramamāṇasya — enjoying; saṁvatsara — years; gaṇān — many; bahūn — great many; gṛhamedheṣu — in household life; yogeṣu — in sex life; virāgaḥ — detachment; samajāyata — awakened.
Translation: 
The Lord was thus engaged in household life for many, many years, but at last His detachment from ephemeral sex life was fully manifested.
Purport: 

Even though the Lord is never attached to any kind of material sex life, as the universal teacher He remained a householder for many, many years, just to teach others how one should live in householder life. Śrīla Viśvanātha Cakravartī Ṭhākura explains that the word samajāyata means “fully exhibited.” In all His activities while present on the earth, the Lord exhibited detachment. This was fully displayed when He wanted to teach by example that one should not remain attached to household life for all the days of one’s life. One should naturally develop detachment as a matter of course. The Lord’s detachment from household life does not indicate detachment from His eternal associates, the transcendental cowherd damsels. But the Lord desired to end His so-called attachment to the three modes of material nature. He can never be detached from the service of His transcendental associates like Rukmiṇī and other goddesses of fortune, as described in the Brahma-saṁhitā (5.29): lakṣmī-sahasra-śata-sambhrama-sevyamānam.