Hi Alex,
On 7/28/21 11:32 AM, ajlen...@dynamicdevices.co.uk wrote:
Hi all,
I'm trying to write a driver for Quectel modems as I need some specific bits
and bobs - mainly signal strengths for the serving cell and neighbourhood cells
I can't quite get my head around when I am supposed to provide free() functions
to to calls and when to free in callbacks on success or error conditions.
I'm not sure what you mean? What exactly do you think needs freeing?
Everything from the driver going to the core are const * or passed by value.
There should be no instances of the core taking ownership of any memory from the
driver. To put another way, if the driver mallocs something, then the driver is
responsible for freeing it.
Similarly, everything being passed in from the core to the driver is a const *
or passed by value.
Fundamentally, there should never be any resource ownership change between
driver and core...
Is there a bit of a document somewhere somebody could direct me to that
explains this?
Or maybe I am overthinking and somebody could just explain the logic behind it?
Thanks!
Alex
_______________________________________________
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org
Regards,
-Denis
_______________________________________________
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org