Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 159162 Details for
Bug 302927
RxThread leaks memory in oobList
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch 1
bug302927.patch (text/plain), 3.69 KB, created by
James Blackburn
on 2010-02-16 05:45:11 EST
(
hide
)
Description:
patch 1
Filename:
MIME Type:
Creator:
James Blackburn
Created:
2010-02-16 05:45:11 EST
Size:
3.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.debug.mi.core >Index: mi/org/eclipse/cdt/debug/mi/core/RxThread.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java,v >retrieving revision 1.20 >diff -u -r1.20 RxThread.java >--- mi/org/eclipse/cdt/debug/mi/core/RxThread.java 30 Sep 2009 13:06:41 -0000 1.20 >+++ mi/org/eclipse/cdt/debug/mi/core/RxThread.java 16 Feb 2010 10:42:18 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 QNX Software Systems and others. >+ * Copyright (c) 2000, 2010 QNX Software 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 >@@ -66,7 +66,7 @@ > public class RxThread extends Thread { > > final MISession session; >- List oobList; >+ List<MIStreamRecord> oobList; > CLIProcessor cli; > int prompt = 1; // 1 --> Primary prompt "(gdb)"; 2 --> Secondary Prompt ">" > boolean fEnableConsole = true; >@@ -75,7 +75,7 @@ > super("MI RX Thread"); //$NON-NLS-1$ > session = s; > cli = new CLIProcessor(session); >- oobList = new ArrayList(); >+ oobList = new ArrayList<MIStreamRecord>(); > } > > /* >@@ -168,7 +168,7 @@ > void processMIOutput(String buffer) { > MIOutput response = session.parse(buffer); > if (response != null) { >- List list = new ArrayList(); >+ List<MIEvent> list = new ArrayList<MIEvent>(); > CommandQueue rxQueue = session.getRxQueue(); > > MIResultRecord rr = response.getMIResultRecord(); >@@ -259,9 +259,12 @@ > for (int i = 0; i < oobs.length; i++) { > processMIOOBRecord(oobs[i], list); > } >+ // If not waiting for any command results, don't need the result in the oobList >+ if (rxQueue.isEmpty()) >+ oobList.clear(); > } > >- MIEvent[] events = (MIEvent[]) list.toArray(new MIEvent[list.size()]); >+ MIEvent[] events = list.toArray(new MIEvent[list.size()]); > session.fireEvents(events); > } // if response != null > } >@@ -269,7 +272,7 @@ > /** > * Dispatch a thread to deal with the listeners. > */ >- void processMIOOBRecord(MIOOBRecord oob, List list) { >+ void processMIOOBRecord(MIOOBRecord oob, List<MIEvent> list) { > if (oob instanceof MIAsyncRecord) { > processMIOOBRecord((MIAsyncRecord) oob, list); > oobList.clear(); >@@ -278,7 +281,7 @@ > } > } > >- void processMIOOBRecord(MIAsyncRecord async, List list) { >+ void processMIOOBRecord(MIAsyncRecord async, List<MIEvent> list) { > if (async instanceof MIExecAsyncOutput) { > MIExecAsyncOutput exec = (MIExecAsyncOutput) async; > // Change of state. >@@ -393,7 +396,7 @@ > /** > * Check for any info that we can gather form the console. > */ >- void processMIOOBRecord(MIResultRecord rr, List list) { >+ void processMIOOBRecord(MIResultRecord rr, List<MIEvent> list) { > MIResult[] results = rr.getMIResults(); > for (int i = 0; i < results.length; i++) { > String var = results[i].getVariable(); >@@ -526,8 +529,8 @@ > } > > String[] getStreamRecords() { >- List streamRecords = new ArrayList(); >- MIOOBRecord[] oobRecords = (MIOOBRecord[]) oobList.toArray(new MIOOBRecord[0]); >+ List<String> streamRecords = new ArrayList<String>(); >+ MIOOBRecord[] oobRecords = oobList.toArray(new MIOOBRecord[0]); > for (int i = 0; i < oobRecords.length; i++) { > if (oobRecords[i] instanceof MIStreamRecord) { > String s = ((MIStreamRecord) oobRecords[i]).getString().trim(); >@@ -536,7 +539,7 @@ > } > } > } >- return (String[]) streamRecords.toArray(new String[0]); >+ return streamRecords.toArray(new String[0]); > } > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jamesblackburn+eclipse
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 302927
:
159162
|
159230
|
159758