If you decide to move to another country and become non-resident then you must pay a departure tax. This departure tax is calculated based on a deemed disposition of most of your assets (even though you may not have necessarily sold them) at the fair market value. You then must pay the regular capital gains tax.
Among the assets that are not subject to this calculation are registered assets (such as RRSPs, RRIFs and pensions), real estate and some other classes of assets.
Since it’s possible that you have not actually sold property, but still owe the departure tax, the government does allow you to defer payment on those taxes (with zero interest on the balance) if you put up some collateral. Further, actual collateral is not required on the first $100,000 of capital gains. For any amount of departure tax owing, you can defer the payment until you actually do sell the assets.