[[ Bug 11920 ]] Fixed memory leak in dilateXY.