-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new expression being used in src/zephyr/concrete_ble_transmitter.cpp #52
Comments
It does, but are right in raising it. We're trying to remove all dynamic allocation (which will also mean removing most STL use). |
Note: Zephyr docs do not reflect current feature status. See zephyrproject-rtos/zephyr#31281 |
This is correct usage according to the samples, but it was not clearing up the newvalue correctly and so leaking memory over time. A fix for this will be committed momentarily. newvalue dynamic allocation is required as the payload changes over time, and the length could change too. Once read into the attribute cache in Zephyr the value can safely be deleted. |
Fixes #52. Clears newly allocated payload temporary copy once used. Signed-off-by: Adam Fowler <adam@adamfowler.org>
Zephyr requires a char* allocation to copy to its attribute cache. Usage is correct. We now also clear up the temporary value. I have confirmed Zephyr doesn't do this itself. Tested on nRF52832DK. Signed-off-by: Adam Fowler <adam@adamfowler.org>
I am seeing the
new
expression being used in the following line:I don't believe zephyr supports using the
new
operator as per documentation here.The text was updated successfully, but these errors were encountered: