Compartilhar via


ScheduleGroup::Release Method

Decrements the scheduler group reference count.

virtual unsigned int Release() =0;

Return Value

The newly decremented reference count.

Remarks

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.

Requirements

Header: concrt.h

Namespace: concurrency

See Also

Reference

ScheduleGroup Class

ScheduleGroup::Reference Method

CurrentScheduler::CreateScheduleGroup Method

Scheduler::CreateScheduleGroup Method