Any city situated in any county adjoining or containing a United States military reservation, which has levied a tax for the purpose of acquiring, establishing, and maintaining buildings, rooms and facilities for the recreation and entertainment of United States soldiers and their relatives and friends, may, upon the abandonment or closing of such military reservation, and when in the judgment of its governing body it shall be deemed necessary and desirable, transfer all or any part of such fund no longer necessary or required for the purposes for which levied and collected, into the general fund of such city.