Srimad Bhagavatam Canto 10, Chapter 45, Text 28

SB 10.45.28

yah krsna-rama-janmarkse
 mano-datta maha-matih
tas cadadad anusmrtya
 kamsenadharmato hrtah
 
Translation: 
 
The magnanimous Vasudeva then remembered the cows he had mentally given away on the occasion of Krsna’s and Balarama’s birth. Kamsa had stolen those cows, and Vasudeva now recovered them and gave them away in charity also.
 
Purport: 
 
At the time of Krsna’s appearance, Vasudeva had been imprisoned by Kamsa, who had stolen all his cows. Still, Vasudeva had been so jubilant at the birth of the Lord that he had mentally donated ten thousand of his cows to the brahmanas.
 
Now, upon Kamsa’s death, Vasudeva took back all his cows from the late King’s herd and gave ten thousand of them, according to religious principles, to the worthy brahmanas.
Srimad Bhagavatam Canto 10, Chapter 45, Text 27
Srimad Bhagavatam Canto 10, Chapter 45, Text 29