It sounds as though you may have been told about "Bed and Isa" which is a more modern take on "Bed and breakfast" whereby people would sell shares to crystalise a capital gain up to their CGT allowance and then repurchase the shares. This stopped working when CGT matching rules were changed but...