StringStream's memory leak

This should solve the problem of memory's leak in StringStream