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 ts...@apache.org on 2016/03/02 09:30:53 UTC

svn commit: r1733231 - /incubator/log4cxx/trunk/src/main/cpp/hierarchy.cpp

Author: tschoening
Date: Wed Mar  2 08:30:52 2016
New Revision: 1733231

URL: http://svn.apache.org/viewvc?rev=1733231&view=rev
Log:
LOGCXX-430: Multithreaded applications may crash when calling ~Hierarchy, so I'll apply the same workaround like for APRInitializer for now. Tests still pass in my env.

https://issues.apache.org/jira/browse/LOGCXX-430?focusedCommentId=15175254&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15175254

Modified:
    incubator/log4cxx/trunk/src/main/cpp/hierarchy.cpp

Modified: incubator/log4cxx/trunk/src/main/cpp/hierarchy.cpp
URL: http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/cpp/hierarchy.cpp?rev=1733231&r1=1733230&r2=1733231&view=diff
==============================================================================
--- incubator/log4cxx/trunk/src/main/cpp/hierarchy.cpp (original)
+++ incubator/log4cxx/trunk/src/main/cpp/hierarchy.cpp Wed Mar  2 08:30:52 2016
@@ -67,8 +67,12 @@ provisionNodes(new ProvisionNodeMap())
 
 Hierarchy::~Hierarchy()
 {
-    delete loggers;
-    delete provisionNodes;
+// TODO LOGCXX-430
+// https://issues.apache.org/jira/browse/LOGCXX-430?focusedCommentId=15175254&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15175254
+#ifndef APR_HAS_THREADS
+	delete loggers;
+	delete provisionNodes;
+#endif
 }
 
 void Hierarchy::addRef() const {