DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

ResourceSubscribe

Track a resource

SYNOPSIS

dip_Error dip_ResourceSubscribe( resource, freeResourceHandler, resources )

FUNCTION

Track a resource. The resource must be represented by a void *. A handler function to free the resource must be given. This function will be called through dip_ResourcesFree with the resource as its only parameter. If dip_ResourceSubscribe fails, the resource is not registered. It is allowed to pass a zero instead of a dip_Resources structure, in which case dip_ResourceSubscribe returns silently.

ARGUMENTS

Data typeNameDescription
void *resourceThe resource that must be registered
dip_ResourcesFreeHandlerfreeResourceHandlerThe handler function that will be invoked by dip_ResourcesFree to free the resource
dip_Resourcesresourcesdip_Resources structure to register the resource with

SEE ALSO

ResourcesNew, ResourcesFree, ResourcesMerge, ResourceUnsubscribe