[PATCH 03/10 v4] gdiplus: Add functions for managing metafile objects id

Piotr Caban piotr.caban at gmail.com
Mon Jul 3 02:03:42 CDT 2017


On 06/30/17 22:24, Vincent Povirk wrote:
> This seems like overkill to me?
I just realized that maybe you were only referring to the comment. If 
you prefer I can change it to something like:
TODO: object id should not be released here
or I can even remove the function for releasing the IDs for now.

> I don't see the need for per-object refcounting. Every drawing
> operation that uses an object is just going to end with a series of
> releases, and after it returns all refcounts should be 0.
Currently there's no per-object refcounting. There's only kind of a 
timestamp that stores when object id was last used. Thanks to it the 
function frees object that was not used for the longest time first. This 
will be needed for reusing of object IDs. Also thanks to it we don't 
need to free the IDs on all error paths.

Thanks,
Piotr



More information about the wine-devel mailing list