Log4cxx
  1. Log4cxx
  2. LOGCXX-117

Memory leak with ThreadSpecificData on Win32

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Win32

      Description

      I use the VLD (visual leak detector) with my applications and log4cxx and noticed quite some memory leaks. Well, in my specific application a huge number of threads might be spawn in the course of time. Is there a way to get rid of the ThreadSpecificData again? My application runs on Win32, and so the APRInitializer::tlsDestruct() won't be called.
      Consequently I've patched log4cxx by introducing a method to explicitly free the ThreadSpecificData, but that's of course not transparent. Is there an intend to provide the same behaviour of the APR for Win32 eventually? Any other ideas about that problem?

      Call freeCurrentData() just before your thread terminates in order to free the thread specific data.

        Activity

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Kriz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development