1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 331232 - There are memory leaks with each GDB debug session (partial fix)

This commit is contained in:
Anton Leherbauer 2011-05-13 10:33:44 +00:00
parent db1a6be8f8
commit c1a81dbd68
3 changed files with 13 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2010 Ericsson and others.
* Copyright (c) 2009, 2011 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -82,6 +82,11 @@ public class TracingConsole extends IOConsole {
fTracingStream.close();
} catch (IOException e) {
}
fSession.getExecutor().submit(new DsfRunnable() {
public void run() {
fSession.removeServiceEventListener(TracingConsole.this);
}
});
super.dispose();
}

View file

@ -218,7 +218,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService
public int hashCode() { return baseHashCode() ^ (fId == null ? 0 : fId.hashCode()); }
}
private class GDBContainerDMC extends MIContainerDMC
private static class GDBContainerDMC extends MIContainerDMC
implements IMemoryDMContext
{
public GDBContainerDMC(String sessionId, IProcessDMContext processDmc, String groupId) {

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2010 Wind River Systems and others.
* Copyright (c) 2006, 2011 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -498,5 +498,9 @@ public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor
return super.shutdownNow();
}
@Override
protected void terminated() {
fThreadToExecutorMap.remove(((DsfThreadFactory)getThreadFactory()).fThread);
super.terminated();
}
}