refactor to use scoped pointer instead of manual deletion
refactor to use scoped pointer instead of manual deletion

cmacq2/kate,hlamer/kate,hlamer/kate,jfmcarreira/kate,sandsmark/kate,sandsmark/kate,hlamer/kate,hlamer/kate,sandsmark/kate,DickJ/kate,hlamer/kate,DickJ/kate,hlamer/kate,cmacq2/kate,cmacq2/kate,jfmcarreira/kate,sandsmark/kate,jfmcarreira/kate,DickJ/kate,hlamer/kate,DickJ/kate,hlamer/kate,hlamer/kate,hlamer/kate