diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-04-15 16:47:52 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-04-15 16:47:52 +1000 | 
| commit | faf57f45eae60a257a8076c83c71c422486f88ce (patch) | |
| tree | bae925421b4048bc7de7784e38d73b9960e85553 /src/PerLine.cxx | |
| parent | 75dba090f235fc4d24691bd1b57928f89ebe9f1b (diff) | |
| download | scintilla-mirror-faf57f45eae60a257a8076c83c71c422486f88ce.tar.gz | |
Avoid calling virtual functions in constructors and destructors.
Diffstat (limited to 'src/PerLine.cxx')
| -rw-r--r-- | src/PerLine.cxx | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 41e767ab7..d03723c1b 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -121,7 +121,11 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) {  }  LineMarkers::~LineMarkers() { -	Init(); +	for (int line = 0; line < markers.Length(); line++) { +		delete markers[line]; +		markers[line] = 0; +	} +	markers.DeleteAll();  }  void LineMarkers::Init() { @@ -490,7 +494,10 @@ int LineAnnotation::Lines(Sci::Line line) const {  }  LineTabstops::~LineTabstops() { -	Init(); +	for (int line = 0; line < tabstops.Length(); line++) { +		delete tabstops[line]; +	} +	tabstops.DeleteAll();  }  void LineTabstops::Init() {  | 
