[resend v2 4/4] ddraw: Do refcounting only through wined3d_texture_{inc, dec}ref().

Henri Verbeet hverbeet at gmail.com
Sun Jan 3 12:50:19 CST 2016


On 3 January 2016 at 19:44, Stefan Dösinger <stefandoesinger at gmail.com> wrote:
> Am 2016-01-03 um 18:06 schrieb Henri Verbeet:
>>> -    wined3d_surface_incref(wined3d_surface);
>>> +    wined3d_texture_incref(wined3d_texture);
>>>      surface->wined3d_surface = wined3d_surface;
>>> +    surface->wined3d_texture = wined3d_texture;
>> The reference counting here is odd. You'd normally increment the
>> reference count right before or after storing the pointer.
> This goes back to one of my suggestions: The individual subresources already hold a reference to the texture. This decref removes the initial ref from the texture_create call.

Are you perhaps thinking about the wined3d_texture_decref() call in
ddraw_surface_create()? That one makes sense, but it's not what I
commented on.



More information about the wine-devel mailing list