[2/2]dwrite: basic implementation for FontCollectionLoader registration

Henri Verbeet hverbeet at gmail.com
Mon Aug 4 08:32:39 CDT 2014

On 4 August 2014 15:18, Aric Stewart <aric at codeweavers.com> wrote:
> I do not think a given application will be registering very many of these. No experience yet but I would be surprised at more than 2. So I am not sure if exponential is the right course.  But it is an easy change.
There are only very few cases where doubling the array size isn't the
right thing to do.

> Maybe i have been spending too much time out of C recently, but I am totally failing to see the leak.
If heap_realloc() fails, the previous allocation is lost because you
end up assigning NULL to This->CollectionLoaders. I personally also
would prefer to write the sizeof's as

> +    if (i == This->CollectionLoaderCount)
> +            return E_INVALIDARG;

More information about the wine-devel mailing list