<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 4, 2013, at 11:13 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 4, 2013 at 2:12 PM, Puyan Lotfi <span dir="ltr"><<a href="mailto:plotfi@apple.com" target="_blank" class="cremed">plotfi@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">It still seems to me that there should be the option of passing argv directly without having copies. Most of the tools don’t need duplicates managed and a lot of clang at the moment is leaking the -mllvm args as well so that’s the same case. I think it would be good to be able to call ParseCommandLineOptioms(argc, argv, “Foo tool\n”, false /* makePersistentCopies=false */);  (where the default behavior is to make dupes) and just not have any dupes generated in the current context as an option.</blockquote>
</div><br>You say a few times that there should be this option or that it would be good to have, but you never say *why*, or address the reasons I gave for why not.</div></div>
</blockquote></div><br><div><br></div><div>The reason why I think this option is good is to avoid allocating memory twice and avoid calling malloc when the strings are already going to persist (despite the small performance impact). I understand your reasons for not wanting a buggy interface that clients would use and have all kinds of unexpected use-after-free bugs, but I’m not proposing this as a default. </div></body></html>