proj4: improve memory method