The racetrack at the Alameda County Fairgrounds has closed, marking the end of at least five generations of horse racing in Pleasanton.