bugfix from 5.0.2: potentital memory leak in receiver if setDetectorType called directly from outside

This commit is contained in:
2020-12-04 14:33:53 +01:00
3 changed files with 11 additions and 24 deletions
+7 -23
View File
@@ -1,7 +1,7 @@
SLS Detector Package 5.0.1 released on 25.11.2020 (Bug Fix Release)
SLS Detector Package 5.1.0 released on xx.xx.2020 (Minor Release)
===================================================================
This document describes the differences between 5.0.1 and 5.0.0 releases.
This document describes the differences between 5.1.0 and 5.x.x releases.
@@ -18,35 +18,19 @@ This document describes the differences between 5.0.1 and 5.0.0 releases.
1. Topics Concerning
====================
- Python bindings
- CMake improvements
- potentital memory leak in receiver
2. Resolved Issues
==================
Python bindings
---------------
Receiver
--------
1. Fixed function signatures for getRxUDPSocketBufferSize,
setRxUDPSocketBufferSize and getRxRealUDPSocketBufferSize.
1. Current code only calls Implementation::setDetectorType from constructor,
but potential memory leak if called out of constructor context. Fixed.
2. Updated pybind11 to v2.6.1 to remove warnings with Python 3.9 and
better handling of C++ standard.
3. Added missing properties in Python.
CMake improvements
------------------
1. Explicitly state Python 3.6 or greater.
2. Finds the Python of the activated environment when using conda
without having to supply additional arguments.
3. Removed redundant libraries for linking targets.
@@ -121,6 +121,9 @@ void Implementation::setDetectorType(const detectorType d) {
std::to_string(static_cast<int>(d)));
}
delete generalData;
generalData = nullptr;
// set detector specific variables
switch (myDetectorType) {
case GOTTHARD:
+1 -1
View File
@@ -368,7 +368,7 @@ class Implementation : private virtual slsDetectorDefs {
void *pRawDataReady{nullptr};
// class objects
GeneralData *generalData;
GeneralData *generalData{nullptr};
std::vector<std::unique_ptr<Listener>> listener;
std::vector<std::unique_ptr<DataProcessor>> dataProcessor;
std::vector<std::unique_ptr<DataStreamer>> dataStreamer;