rings: added destructor to cursor to fix a memory leak
rings,uapp: misc memory leaks