  We observe 84 candidate young high-mass sources in the rare isotopologues
C17O and C18O to investigate whether there is evidence for depletion
(freeze-out) towards these objects. Observations of the J=2-1 transitions of
C18O and C17O are used to derive the column densities of gas towards the
sources and these are compared with those derived from submillimetre continuum
observations. The derived fractional abundance suggests that the CO species
show a range of degrees of depletion towards the objects. We then use the
radiative transfer code RATRAN to model a selection of the sources to confirm
that the spread of abundances is not a result of assumptions made when
calculating the column densities. We find a range of abundances of C17O that
cannot be accounted for by global variations in either the temperature or dust
properties and so must reflect source to source variations. The most likely
explanation is that different sources show different degrees of depletion of
the CO. Comparison of the C17O linewidths of our sources with those of CS
presented by other authors reveal a division of the sources into two groups.
Sources with a CS linewidth >3 km/s have low abundances of C17O while sources
with narrower CS lines have typically higher C17O abundances. We suggest that
this represents an evolutionary trend. Depletion towards these objects shows
that the gas remains cold and dense for long enough for the trace species to
deplete. The range of depletion measured suggests that these objects have
lifetimes of 2-4x10^5 years.
