apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: [PATCH] WIN32 allow destructors for apr_threadkey_private
Date Mon, 21 Aug 2006 19:03:40 GMT
William A. Rowe, Jr. wrote:
> Branko ─îibej wrote:
>   
>> I've recently learned of a trick that would make this work anywhere,
>> even in a static lib, and wouldn't need DllMain. You can actually insert
>> your own constructors and destructors into the CRT's tables.
>>     
>
> Two questions - does this include per-thread on thread exit destruction, and
> how much variance is there from crt to crt?  I'm particularly worried since
> more and more code is built with mixed crts, e.g. a 2003 and a 2005 runtime.
>   
Yes, there are per-thread tables, and I've tested this with MSVC5, 6 and
VS2005 (the latter also on AMD64 and Itanium). I don't think the format
of these tables can change without a radical modification of the Windows
ABI, because the loader actually invokes those c/dtors, not the CRT.

-- Brane


Mime
View raw message