Skip to content

Reset pointers to deleted Attribute::value

Follow-up of discussion from #555.

When Attribute::value memory is deleted, sometimes the pointer is not reset to nullptr. This makes crash investigation harder (some other object may be allocated in the memory used previously by Attribute::value).

Some places were fixed in bf8ce6cf1dbc664c6e144ad86598d358f5e1fe20 but there are others, like:

https://github.com/tango-controls/cppTango/blob/ab05abc289d187130614966e4c79e5390ca41b16/cppapi/server/device.cpp#L2944-L2950

https://github.com/tango-controls/cppTango/blob/ab05abc289d187130614966e4c79e5390ca41b16/cppapi/server/device.h#L3683-L3684

https://github.com/tango-controls/cppTango/blob/ab05abc289d187130614966e4c79e5390ca41b16/cppapi/server/device.cpp#L5333-L5336

For now the issue is opened only for Attribute::value. I have not found other pointers with this problem. If there are any, I suggest to have another issue.

Edited by Reynald Bourtembourg