|
[
Permalink
| « Hide
]
Kovalenko Dmitry added a comment - 26/Sep/09 11:56 PM
DllMain for icuuc30.dll
Calling umtx_init(NULL) is related to implementation details not documented. u_init was been marked as DRAFT in 3.0, but apparently was been later marked as stable since 2.6. What compilation problem did you had?
But u_cleanup, IMO, may cause more harm than good. Suppose one application loads fbembed and ICU, then unload fbembed. u_cleanup does not do referencing counting, so it will clean ICU used by the application. For the DllMain, that is how really they should do it. But I would not like for us to fix all they problems, this one, for example, has a very low surface: fbembed being loaded and unloaded will cause leaks. I'll verify more recent versions and report a bug for them if appropriate. >Calling umtx_init(NULL) is related to implementation details not documented.
documentation - for external users. "DllMain" - this is "internal" user :) > u_init was been marked as DRAFT in 3.0, but apparently was been later marked as stable since 2.6. What compilation problem did you had? u_init returns the status code. When I tried to detect and process fail-status-code (and return the FALSE from DllMain) genrb.exe was fail --- IBProvider+fbembed can to use ICU library together So, ICU DLL should independently initialize and deinitialize the own global internal resources (for example, in DllMain code) This is general rule for all normal DLLs. ---- As I understand (but not sure) u_cleanup produces the next problem: - icuin30.dll registers the callback function in icuuc30.dll - icuin30.dll unloads from memory - icuuc30.dll calls the function by wrong pointer Then I decide do not use the u_cleanup, and use the umtx_cleanup only ---- Thank you. Fixed only the initialization problem, and not the cleanup.
I'd hate to change ICU sources, and it will not work for Linux distributions that uses system ICU anyway. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||