unify the way a cursor is created and closed (in pokerservice for now)