Fix memory leak when calling toString on a normal object