[Lldb-commits] [lldb] [lldb] Make ValueObjectDynamicValue::UpdateValue() point to a host b… (PR #125143)

via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 3 15:59:12 PST 2025


jimingham wrote:



> On Feb 3, 2025, at 3:48 PM, Augusto Noronha ***@***.***> wrote:
> 
> 
> What are the ownership rules for that reference to bytes that you are passing out? Who's keeping it alive and for how long?
> 
> Since ValueObjectDynamicValue::UpdateValue immediately copies the buffer over I don't think that's a big concern...
> 
> I could change ArrayRef to an actual buffer that owns the data, but I think that would be a bit wasteful since UpdateValue always copies it anyway.
> 
> Or are you asking me to clarify in the documentation that callers have to copy out the data if they want to own it?
> 
The latter.  

Jim


>> Reply to this email directly, view it on GitHub <https://github.com/llvm/llvm-project/pull/125143#issuecomment-2632432779>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUPVW4AHJQP55XVZ2J56BT2N755LAVCNFSM6AAAAABWGPIRJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZSGQZTENZXHE>.
> You are receiving this because your review was requested.
> 



https://github.com/llvm/llvm-project/pull/125143


More information about the lldb-commits mailing list