[1/2] winetest: malloc() & co are encapsulated, so encapsulate free() too.

Alexandre Julliard julliard at winehq.org
Fri May 15 04:33:32 CDT 2009


Francois Gouget <fgouget at free.fr> writes:

> It's not very clean to encapsulate malloc() & co with xmalloc(), etc, 
> but to then call free() directly. It means if the implementation of 
> xmalloc() is changed to call HeapAlloc() all the free() have to be 
> changed. So encapsulate free() too.

xmalloc() is clearly a wrapper around malloc(), so there's no need to
rename free(). If you want to change the allocation you should rename
both to heap_alloc/heap_free or something like that.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list