If you are leaving Canada. You can withdraw as a CDN tax resident and it's taxable income. Or you can withdraw as a non-tax resident of Canada which will have a flat tax applied.
If you own locked-in RRSPs, generally you will not be allowed to withdraw funds from them. If you do not know if your RRSPs are locked in, contact your RRSP issuer. If your RRSPs are not locked in, you can withdraw funds at any time. Please check this CRA link Making withdrawals.
Thanks for choosing TurboTax.