Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 06c72a8

Browse filesBrowse files
authored
Merge pull request #98 from iot-dsa-v2/feature/153453_memory_leak
Feature/153453 memory leak
2 parents 0c78ae6 + 9366904 commit 06c72a8
Copy full SHA for 06c72a8

File tree

4 files changed

+7
-2
lines changed
Filter options

4 files changed

+7
-2
lines changed

‎src/broker/broker.cc

Copy file name to clipboardExpand all lines: src/broker/broker.cc
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ void DsBroker::init(ref_<Module>&& default_module) {
113113
void DsBroker::destroy_impl() {
114114
_upstream->destroy();
115115
modules->destroy();
116+
_v1_manager->destroy();
116117
_v1_manager.reset();
117118

118119
if (_tcp_server != nullptr) {

‎src/broker/v1/v1_session_manager.cc

Copy file name to clipboardExpand all lines: src/broker/v1/v1_session_manager.cc
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ void V1SessionManager::destroy_impl() {
2727
}
2828
_sessions.clear();
2929
_state_manager.reset();
30+
_shared_ptr.reset();
3031
}
3132

3233
void V1SessionManager::on_conn(const string_& dsid, const string_& token,
@@ -103,4 +104,4 @@ void V1SessionManager::on_ws(shared_ptr_<Websocket>&& ws, const string_& dsid,
103104

104105
ws->destroy();
105106
}
106-
} // namespace dsa
107+
} // namespace dsa

‎src/sdk/core/editable_strand.cc

Copy file name to clipboardExpand all lines: src/sdk/core/editable_strand.cc
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ void EditableStrand::destroy_impl() {
7474
_stream_acceptor.reset();
7575
_client_manager.reset();
7676
_authorizer.reset();
77+
_storage.reset();
7778

7879
{
7980
std::lock_guard<std::mutex> lock(_inject_mutex);

‎src/sdk/core/session.h

Copy file name to clipboardExpand all lines: src/sdk/core/session.h
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class BaseSession : public DestroyableRef<BaseSession> {
6666

6767
virtual bool is_connected() const = 0;
6868
virtual string_ map_pub_path(const string_ &path) = 0;
69+
70+
virtual ~BaseSession() = default;
6971
};
7072

7173
// maintain request and response streams
@@ -206,4 +208,4 @@ class Session final : public BaseSession {
206208

207209
} // namespace dsa
208210

209-
#endif // DSA_SDK_SESSION_H
211+
#endif // DSA_SDK_SESSION_H

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.