Re: [RFC 8/8] mi/python: Allow redefinition of python MI commands

Tom Tromey
2019-05-08T18:00:44Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

>>> If we know that we don't access that pointer after it is possibly stale, and
>>> we document that fact properly, I think we can keep what you had initially.
>>> Using shared_ptr has a cost, and it's not really essential here.
>>>
>>
>> All right. Thanks!

Simon> Well that's my opinion, let's see what Tom thinks about it.

I'm of two minds.

On the one hand, this sort of approach is fragile. It's susceptible to
introducing bugs in the future.

On the other hand, it seems somewhat unlikely to actually be a cause of
bugs, since it's doubtful that more code will be added here.

I tend to suspect that using shared_ptr here is not too expensive, but I
don't mind either way I guess.

Tom