What happens to their delegates when Presidential candidates drop out?

I had wondered the question myself and here is the answer


While candidates are frequently referred to as "dropping out" in general conversation, note that the candidates themselves usually use the phrase "suspending my campaign."  They stop actively campaigning - they get rid of their staffs, stop running ads and giving speeches, etc. - but their campaigns don't legally end, so they keep any delegates they've already acquired.  In fact, their names may remain on the ballot in states that haven't voted yet, so it's possible that they could acquire even more delegates despite having "dropped out."
Candidates must receive a majority of the votes at their conventions to receive their party's nomination.  In cases where there are three or more legitimate contenders for the nomination - as appears to be the case for the Republicans as of February 22, 2016 - there is always a chance that the votes are split and no candidate receives that 50%+1 majority.  If that were to happen, an also-ran who had previously suspended their campaign could come in with their still-held delegates and tip the balance toward one candidate or another - and be handsomely rewarded.
In practice over the last few decades, the primary process weeds out enough candidates that the nominee is pretty obvious by spring.  One candidate receives, or clearly will receive, a majority of convention delegates.  When this happens, you may hear about also-rans "releasing their delegates" to the presumptive nominee.  Technically, this doesn't affect anything if the nominee already had enough delegates to win outright, but the also-ran gets some brownie points for promoting party unity, and it allows the nominee to be nominated unanimously at the convention.