I want to perform tasks other than web browsing over Tor, for example XMPP chat. I don't want to have to rely on a Tor implementation in the applications themselves, but I do want to avoid leaking my IP address directly or via DNS lookups. (I understand that I'll still be relying on the application and protocol to not disclose my identity/location in other ways, e.g. fingerprinting.)
If I access remote servers using only .onion addresses (hidden services), will I avoid any leaks? In other words, because it's a .onion address there won't be any regular DNS lookups, IP accesses, etc.