Fix and prevent memory leaks in Rowhelper usage