In the extremely unlikely scenario of a brokered convention, the candidates with pledged delegates would release their delegates to support one of the four people who have delegates: John McCain, Mitt Romney, Mike Huckabee or Ron Paul.
It is most likely that Mike Huckabee would release his delegates to put Senator McCain over the top or else Mitt Romney might do the same.
Back room deals and concessions would determine who released what to whom.
The problem with this is I believe that if the delegates are released they are not bound, but are free to vote for whom ever they choose despite who the candidate pledges them too.