projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
519d0cc
)
Session: Make sure all data is deleted before changing devices
author
Soeren Apel
<soeren@apelpie.net>
Mon, 11 Apr 2016 06:45:36 +0000
(08:45 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Mon, 11 Apr 2016 06:45:36 +0000
(08:45 +0200)
pv/session.cpp
patch
|
blob
|
history
diff --git
a/pv/session.cpp
b/pv/session.cpp
index ebef90cbb6590fb9961fad97f73047e56e8acc79..4bc510e9fa538d5eb3a848fde39ea4604520512d 100644
(file)
--- a/
pv/session.cpp
+++ b/
pv/session.cpp
@@
-142,7
+142,16
@@
void Session::set_device(shared_ptr<devices::Device> device)
// Remove all traces
signals_.clear();
+ cur_logic_segment_.reset();
+
+ for (auto entry : cur_analog_segments_) {
+ shared_ptr<sigrok::Channel>(entry.first).reset();
+ shared_ptr<data::AnalogSegment>(entry.second).reset();
+ }
+
+ logic_data_.reset();
decode_traces_.clear();
+
signals_changed();
device_ = std::move(device);