memory leak fixed, circular dependency between cursor <-> connection prevented both from being deleted, GC doesn't work for objects with __del__