ScheduleGroup::Release Method

Decrements the scheduler group reference count.

virtual unsigned int Release() =0;

The newly decremented reference count.

This is typically used to manage the lifetime of the schedule group for composition. When the reference count of a schedule group falls to zero, the schedule group is deleted by the runtime. After you have called the Release method the specific number of times to remove the creation reference count and any additional references placed using the Reference method, you cannot utilize the schedule group further. Doing so will result in undefined behavior.

A schedule group is associated with a particular scheduler instance. You must ensure that all references to the schedule group are released before all references to the scheduler are released, because the latter could result in the scheduler being destroyed. Doing otherwise results in undefined behavior.

Header: concrt.h

Namespace: concurrency

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft