I am a computer graduate but the idea on which I want to start my startup is mechanical based. I have found a potential candidate but he live in a different country. He is completely new to me but inorder to start my company I need his help. Is there any way by which the freelancer could not leak my idea in case he tends to cheats on me .
One thing you definitely need is a properly drawn up non-disclosure agreement (NDA). That gives you the basis to take legal action against him if he does disclose your ideas.
But an NDA is only useful if you can enforce it. That means hiring lawyers. And if he is in a different country, that would be lawyers in the country where he lives. If you aren't in a position to do that, you have no way to keep your ideas safe.
You are focused on the wrong issue. With every new invention, the most important thing is not employee / contractor theft. The most important factor is "what needs to be in version 2?" When you attempt to sell your new invention, the customers will tell you what features they really need. You will either redesign the invention or go out of business.
When I started out, I was worried about customers ripping off my software inventions and spent a bunch of time and effort trying to put in some kind of copy protection. That was a total waste of time and effort. What was more important was adding the features that customers really needed and were willing to pay for.
So, plan on redesigning it at least twice. A lot of inventions need 5-10 times redesigning. Redo, redo, and redo again until people want to buy it.