Sanctuary
A Sanctuary is a very useful building. Heroes visiting it cannot be attacked. They can stay here as long as it's needed and you don't pay for visiting. However, there can only be one hero in every Sanctuary at the same time.
Tips
If you have a lot of artifacts generating gold or resources, just give them to any hero and send him away to Sanctuary.