You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by "Florian Seydoux (JIRA)" <lo...@logging.apache.org> on 2014/01/11 18:43:51 UTC

[jira] [Updated] (LOGCXX-342) PropertyConfigurator::configureAndWatch leaks memory and threads

     [ https://issues.apache.org/jira/browse/LOGCXX-342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Seydoux updated LOGCXX-342:
-----------------------------------

    Attachment: propertyconfigurator.cpp.patch

Potential fix (not yet tested): turn the standard pointer to a 'smart' one (from the log4cxx::helper) to avoid the memory leak, and use the (already used on other place) concept of [simple] singleton ( cf [LOGCXX-322] )

> PropertyConfigurator::configureAndWatch leaks memory and threads
> ----------------------------------------------------------------
>
>                 Key: LOGCXX-342
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-342
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Configurator
>    Affects Versions: 0.10.0
>         Environment: WinXP 64 bit
>            Reporter: Assaf Lavie
>            Assignee: Florian Seydoux
>            Priority: Critical
>         Attachments: propertyconfigurator.cpp.patch
>
>
> Each call to configureAndWatch causes a new FileWatcher object to be created (without deleting the old one) and consequently a new thread to be created (even though the old one may still be running).
> This means that it's very unsafe to call configureAndWatch more than once (and even when calling it just once, it leaks soem mem and a thread).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)