From cbe41b912283fc8784a54dbf6d723e15fd015cef Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 19 Apr 2006 12:44:21 +0000 Subject: [PATCH] INTEGRATION: CWS sb49 (1.6.20); FILE MERGED 2006/03/22 10:15:19 sb 1.6.20.1: #i63397# Keep objects alive long enough so that threads still running while atexit handlers are processed do not access dead objects. --- bridges/source/remote/context/context.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bridges/source/remote/context/context.cxx b/bridges/source/remote/context/context.cxx index bab58834da31..8fd6474ea786 100644 --- a/bridges/source/remote/context/context.cxx +++ b/bridges/source/remote/context/context.cxx @@ -4,9 +4,9 @@ * * $RCSfile: context.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hr $ $Date: 2005-12-28 17:32:14 $ + * last change: $Author: hr $ $Date: 2006-04-19 13:44:21 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -176,8 +176,9 @@ ContextAdmin *ContextAdmin::getInstance() if( ! g_pTheContext ) { ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() ); if( ! g_pTheContext ) { - static ContextAdmin admin; - g_pTheContext = &admin; + //TODO This memory is leaked; see #i63473# for when this should be + // changed again: + g_pTheContext = new ContextAdmin; } } return g_pTheContext;