Hi,
Background:
I have a main thread that has to call map_json_to_struct and pass the resulting structure to a child thread (not calling map_json_to_struct inside the child thread to avoid using mutex because it will slow down my execution in case of a huge load), The converted structure is not used by any other thread including the main thread.
Issue:
Now the issue is, that whenever the child thread finishes execution, I get memory leaks for some memory created by map_json_to_struct in the main thread,
Ultimately I want to free the resource in the child thread itself(there will not be any synchronization issue as this mapped structure is not used by any other threads)
NOTE: My main thread cannot wait for the child thread to finish so i cannot use join call.
is there a way to handle this scenario?
Thanks in advance
