Udostępnij za pośrednictwem


ScheduleGroup::Release Method

Decrements this scheduler group's 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. Once you have called the Release method the specific number of times to remove the creation reference count and any additional references placed via the Reference method, you may not 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, since 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