On the SeD side, DAGDA and the SeD share the same data pointers, that
means that if the pointer is a local variable reference, when DAGDA
will use the data, it will read an unallocated variable. The users
should allways 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 allocate 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.