On the SeD side, DAGDA and the SeD share the same data pointers, which
means that if the pointer is a local variable reference, it will read an unallocated variable when DAGDA
uses the data. Users
should always allocate the data with a “malloc”/“calloc” or
“new” call on the SeD and agent sides. Because DAGDA takes
the control of the data pointer, there is no risk of memory leak even
if the service allocates a new pointer at each call. The data lifetime
is managed by DAGDA and the data will be freed according to its
persistence mode.
On the SeD and agent sides, DAGDA takes the control of the data
pointers. To free a data may cause major bugs which could be very hard to
find. The users could only free a DIET data on the client side after the end of
a transfer.