This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 14/22] Replace two xmallocs with vector
>>>>> "Pedro" == Pedro Alves <email@example.com> writes:
>> Often the performance doesn't matter, and std::vector is safe to use.
>> On the other hand XNEWVEC isn't really unsafe -- maybe just mildly less
>> clear to gdb newbies.
Pedro> Hmm, the code you're touching isn't using XNEWVEC, so I'm not sure
Pedro> I know exactly what you're referring to, but I assume you're thinking
Pedro> of the xmallocs you're replacing.
Hmm, if it's xmalloc (I'm looking at one patch where it's XCNEWVEC, but
apparently could be XNEWVEC without any loss), then I'm less sure.
XNEWVEC is at least reasonably type-safe, but plain xmalloc less so.
Anyway once unique_ptr is in I'll update all those patches and we can
discuss it more concretely.