CBaseAllocator.Decommit method

The Decommit method decommits the allocator. This method implements the IMemAllocator::Decommit method.

Syntax


HRESULT Decommit();

Parameters

This method has no parameters.

Return value

Returns S_OK.

Remarks

After this method is called, calls to the CBaseAllocator::GetBuffer method will fail. As samples are released, they get returned to the free list. When the last sample is returned, the allocator calls the CBaseAllocator::Free method, which releases the allocated memory. (In the base class, Free is a pure virtual method.)

In addition, this method releases any threads that are blocked on GetBuffer calls. The calls to GetBuffer fail.

Requirements

Header

Amfilter.h (include Streams.h)

Library

Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseAllocator Class

 

 

Show: