Table of contents
Collapse the table of content
Expand the table of content

Freeing Contexts

Last Updated: 4/22/2017

A context is freed after it is deleted and all outstanding references to it have been released.

There is one exception to this rule: if a context has been created but has not been set by calling FltSetXxxContext, it does not need to be deleted. It is freed when its reference count reaches zero. (See the code example in Releasing Contexts.)

When a minifilter driver registers its context types, each context definition can optionally include a context cleanup callback routine to be called before the context is freed. For more information, see PFLT_CONTEXT_CLEANUP_CALLBACK.

© 2017 Microsoft