framework/src/st_things/st_things_representation.c
//--------------------------------------------------------------------------------
/**
 * Api definition for deleting an instance of representation internally.
 */
Api definition for deleting an instance of representation internally.
Api definition for deleting an instance of representation internally .
void destroy_representation_inst_internal(st_things_representation_s *rep, bool destroy_payload)
{
	RET_IF_PARAM_IS_NULL(TAG, rep);
	THINGS_LOG_D(TAG, "Destroy payload: %s.", destroy_payload ? "Yes" : "No");
	if (destroy_payload) {
		OCPayloadDestroy((OCPayload *)(rep->payload));
	}
	things_free(rep);
}
void destroy_representation_inst_internal ( st_things_representation_s * rep , bool destroy_payload ) { RET_IF_PARAM_IS_NULL ( TAG , rep ) ; THINGS_LOG_D ( TAG , " " , destroy_payload ? " " : " " ) ; if ( destroy_payload ) { OCPayloadDestroy ( ( OCPayload * ) ( rep -> payload ) ) ; } things_free ( rep ) ; }
Api definition for deleting an instance of representation internally.
Api definition for deleting an instance of representation internally .
// Payload will be de-allocated for the following cases. // 1. For request representations(created at this API layer). // 2. For all representations created by the application. // DA Stack will de-allocate the payload for other cases. // 1. For response representations.