Best sort it out with your local tax authority before you leave and don't get caught out as some have on returning to their home country and facing horrific back taxes and/or fines.
Every country obviously differs and the tax agreements between different countries vary significantly.
Be careful also with maintaining current accounts, credit cards etc. as some governments will use it as evidence that you had intention to return after filing as a non-resident and will therefore be subject to tax on overseas earnings, a tax agent is the safest way of dealing with all of these issues don't leave it to hearsay.
Good luck.