The DDS_ResourceLimitsQosPolicy::max_samples resource-limit limits the maximum number of samples a DDS_DataWriter can allocate and maintain state for at any given time. Every time a write operation is called, a sample is allocated from the cache and filled in with user-data.
A sample allocated from the pool controlled by this resourece-limit can be reused based on the following rules: