Fixed memory leaks by caching SpatialReference objects and using of OGRGeometry class