[Lldb-commits] [PATCH] Refactor many file functions to use FileSpec over strings.
Zachary Turner
zturner at google.com
Mon May 18 15:00:08 PDT 2015
On Mon, May 18, 2015 at 2:45 PM Vince Harron <vince at nethacker.com> wrote:
> Only got through ProcessPOSIX, will continue later
>
>
> ================
> Comment at: source/API/SBLaunchInfo.cpp:178
> @@ -177,2 +177,3 @@
> {
> - return m_opaque_sp->GetWorkingDirectory();
> + ConstString working_dir{m_opaque_sp->GetWorkingDirectory().GetPath()};
> + return working_dir.GetCString();
> ----------------
> If ConstString gets destructed after GetWorkingDirectory () returns, will
> the memory pointed to by working_dir.GetCString() be freed?
Yea the whole point of ConstString actually is that it interns the string
so it will be available. That's the only way to return c strings to
python, for example. I guess a better name would be InternedString.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150518/87b5c16d/attachment.html>
More information about the lldb-commits
mailing list