mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix memory leak
This commit is contained in:
parent
214698ca9c
commit
0a66354f66
1 changed files with 1 additions and 7 deletions
|
@ -51,8 +51,6 @@ public class CTextTools {
|
||||||
private CCodeScanner fCodeScanner;
|
private CCodeScanner fCodeScanner;
|
||||||
/** The C++ source code scanner */
|
/** The C++ source code scanner */
|
||||||
private CCodeScanner fCppCodeScanner;
|
private CCodeScanner fCppCodeScanner;
|
||||||
/** The C partitions scanner */
|
|
||||||
private FastCPartitionScanner fPartitionScanner;
|
|
||||||
/** The C multiline comment scanner */
|
/** The C multiline comment scanner */
|
||||||
private CCommentScanner fMultilineCommentScanner;
|
private CCommentScanner fMultilineCommentScanner;
|
||||||
/** The C singleline comment scanner */
|
/** The C singleline comment scanner */
|
||||||
|
@ -100,7 +98,6 @@ public class CTextTools {
|
||||||
fColorManager= new CColorManager(autoDisposeOnDisplayDispose);
|
fColorManager= new CColorManager(autoDisposeOnDisplayDispose);
|
||||||
fCodeScanner= new CCodeScanner(fColorManager, store, GCCLanguage.getDefault());
|
fCodeScanner= new CCodeScanner(fColorManager, store, GCCLanguage.getDefault());
|
||||||
fCppCodeScanner= new CCodeScanner(fColorManager, store, GPPLanguage.getDefault());
|
fCppCodeScanner= new CCodeScanner(fColorManager, store, GPPLanguage.getDefault());
|
||||||
fPartitionScanner= new FastCPartitionScanner();
|
|
||||||
|
|
||||||
fMultilineCommentScanner= new CCommentScanner(fColorManager, store, coreStore, ICColorConstants.C_MULTI_LINE_COMMENT);
|
fMultilineCommentScanner= new CCommentScanner(fColorManager, store, coreStore, ICColorConstants.C_MULTI_LINE_COMMENT);
|
||||||
fSinglelineCommentScanner= new CCommentScanner(fColorManager, store, coreStore, ICColorConstants.C_SINGLE_LINE_COMMENT);
|
fSinglelineCommentScanner= new CCommentScanner(fColorManager, store, coreStore, ICColorConstants.C_SINGLE_LINE_COMMENT);
|
||||||
|
@ -132,9 +129,6 @@ public class CTextTools {
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
|
|
||||||
fCodeScanner= null;
|
fCodeScanner= null;
|
||||||
fPartitionScanner= null;
|
|
||||||
|
|
||||||
|
|
||||||
fMultilineCommentScanner= null;
|
fMultilineCommentScanner= null;
|
||||||
fSinglelineCommentScanner= null;
|
fSinglelineCommentScanner= null;
|
||||||
fStringScanner= null;
|
fStringScanner= null;
|
||||||
|
@ -186,7 +180,7 @@ public class CTextTools {
|
||||||
* @return a C partition scanner
|
* @return a C partition scanner
|
||||||
*/
|
*/
|
||||||
public IPartitionTokenScanner getPartitionScanner() {
|
public IPartitionTokenScanner getPartitionScanner() {
|
||||||
return fPartitionScanner;
|
return new FastCPartitionScanner();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue