On Fri Mar 24 20:32:12 2023 +0000, Connor McAdams wrote:
Well, unless the confusion is around the size doubling behavior. That was mainly done to match other dynamic array functions in wine, where AFAIU it's more performant to double the size of an allocation instead of doing realloc every time. It might be unnecessary here.
A BSTR can contain NULL characters. If you allocate a string larger than you need, those extra characters are logically in your string.