msvcp: free facet and _Locimp in Locimp dtor

Daniel Lehman dlehman at
Wed Oct 17 12:20:28 CDT 2012

> You can't add return value to locale__Locimp_dtor since it have to be
> compatible with what native returns. I'm not sure how it's supposed to
> work, I guess locale__Locimp_dtor should be only called when refcount
> already is 0. I'll do some testing tomorrow.

How about something like the attached?  

It moves the call to _Decref up to locale_dtor, so _Locimp_dtor isn't even called if the refcount is non-zero

once it does hit zero, it both calls _Locimp_dtor followed by the delete


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-msvcp90-move-calling-_Decref-up-to-locale_dtor.patch
Type: application/octet-stream
Size: 1876 bytes
Desc: 0001-msvcp90-move-calling-_Decref-up-to-locale_dtor.patch
URL: <>

More information about the wine-devel mailing list