Skip to content

Memory leak with ICU 72.1.0.2 (Windows 11 24H2) #152

@mterrisse

Description

@mterrisse

Hello,

We have a memory leak with ICU 72.1.0.2 on Windows 11 24H2. This doesn't happen with ICU 68.2.0.10 on Windows 11 23H2.

Here are the steps in a gui program with a File / Save As command:

  • LoadLibrary('icuuc.dll')
  • Get the addresses of u_init, u_cleanup, and u_setMemoryFunctions
  • LoadLibrary ('icuin.dll'). This loads icu.dll too.
  • Get the addresses of ucol_open, ucol_close, ucol_strcoll, and ucol_setAttribute
  • Call u_setMemoryFunctions to set memory allocation functions
  • Call u_init. The memory allocation functions are called
  • Open a Save As dialog (GetSaveFileName, comdlg32.dll) and cancel
  • Call u_cleanup (). This doesn't release memory allocated by u_init
  • Call FreeLibray for icuin.dll. icu.dll is not unloaded and memory is not released
  • Note that at this step if you haven't called GetSaveFileName, icu.dll is unloaded and the memory is released
  • Call FreeLibrary for icuuc.dll. No change.

Regards,

Michel Terrisse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions