Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-117

Memory leak with ThreadSpecificData on Win32

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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.

        Attachments

          Activity

            People

            • Assignee:
              carnold@apache.org Curt Arnold
              Reporter:
              chris75vie Kriz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: