FltReleaseContext decrements the reference count on a context.
- Context [in]
Pointer to the context. Must be a valid pointer to a context object for a volume, instance, stream, or stream handle. This parameter is required and cannot be NULL.
A minifilter driver calls FltReleaseContext to release a context. FltReleaseContext decrements the reference count on the given context. When the reference count reaches zero, the context is freed immediately if the caller is running at IRQL <= APC_LEVEL. If the caller is running at IRQL DISPATCH_LEVEL, a work item is scheduled to free the context.
Note that the OldContext pointer returned by FltSetXxxContext and the Context parameter that is used to call FltDeleteContext must also be released by calling FltReleaseContext when they are no longer needed.
To allocate a new context, call FltAllocateContext.
To increment the reference count on a context, call FltReferenceContext.
For more information about context reference counting, see Referencing Contexts.
Callers of FltReleaseContext must be running at IRQL <= DISPATCH_LEVEL if the context was allocated from nonpaged pool. If the context was allocated from paged pool, callers must be running at IRQL <= APC_LEVEL.
|See Remarks section.|