diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-02 19:48:24 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-02 19:48:24 +0200 |
commit | 9ecd09263535843e287048d299ca5bdfc85d18d9 (patch) | |
tree | f6c424072a154775ff890cbbf90f8b48d9319d42 /CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp | |
parent | 4ab2164774bdb9a29b2f180a9013c26c0155628d (diff) |
Remove pointer generator that make memory leaks.
Only have 1 place where to generate a pointer from a DiagnosticRequest
is in low-can-cb.cpp when subscribing. Else now using reference instead
of raw pointer.
Change-Id: I7fd2f3d30afa90017b945e6b711922036123b6d3
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp')
-rw-r--r-- | CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp index 61775b8e..f503e0a5 100644 --- a/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp +++ b/CAN-binder/low-can-binding/diagnostic/active-diagnostic-request.cpp @@ -65,14 +65,14 @@ active_diagnostic_request_t::active_diagnostic_request_t() socket_{} {} -active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, DiagnosticRequest* request, +active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, uint32_t id, const std::string& name, bool wait_for_multiple_responses, const DiagnosticResponseDecoder decoder, const DiagnosticResponseCallback callback, float frequencyHz) : bus_{bus}, - id_{request->arbitration_id}, + id_{id}, handle_{nullptr}, name_{name}, decoder_{decoder}, |