Support arbitrary free & destroy function
When data is shared with PDI then released, PDI is responsible for destroying and freeing the data. Currently, the user has no say on how it's done.
The destroy function should be part of the data type and we should
-
support setting the destroy function when creating a type
The free function should be set on a per-data basis and we should
-
support setting the free function when sharing a data
In order to do both of these, the user should be able to
-
share functions (pointers) with PDI