Fixes Memory leak in String size compute Method