Shares transferred from one account to another triggers a 'deemed disposition" for income tax purposes. There is not an actual sell and buy. The transfer in and transfer out share price is the same for these type of transactions, which would not be guaranteed in a sell and buy situation.
If there is a capital gain going from a non-registered to a registered account, it must be reported on your tax return, however a capital loss cannot be claimed.