We consider algebras for which the operation PC of pure closure of subsets satisfies the exchange property. Subsets that are independent with respect to PC are directly independent. We investigate algebras in which PC satisfies the exchange property and which are relatively free on a directly independent generating subset. Examples of such algebras include independence algebras and dinitely generated free modules over principal ideal domains.