The Gorgie club revealed last week that both players will be released when their contracts expire at the end of the season as the former Jambos skipper and coach sets about pruning the squad and the wage bill at Tynecastle.
Barr, believed to be one of the high earners at the club, joined from Falkirk in 2010 while Smith is an academy graduate.
Ahead of Saturday's trip to Dundee in the Clydesdale Bank Premier League Locke, who took over from John McGlynn in March, discussed the downside of his first managerial post.
"It was gut-wrenching to let them know that they were not going to be here next season," he said.
"But I would add that they are two fantastic professionals, I have loved working with them and I hope they go on and do really well.
"John Murray ( director of football), is a big help but that is not a side of things which you enjoy. However, at the end of the day it is part and parcel of football and I have experienced it myself.
"It is not great, but unfortunately we are trying to reduce the wage bill again and still try to bring in players, so it is never easy. Possibly it will be a talk we will need to have again but hopefully not too many times.
"We are working hard behind the scenes. I think if we can get the right players in during the summer then you will see a better and stronger Hearts next season.
"The young players have had a bit of experience this season and hopefully they will kick on and help us to a good season."