ensure that cursor strings are actually freed.