The remove filter method is called when the filter stack is destroyed, or when a filter is removed from a filter stack by the filter_remove function or remove-filter SAF.
It may be too late to flush buffered data when the remove method is invoked. For this reason, filters that buffer outgoing data should implement the flush filter method.
void remove(FilterLayer *layer);
void
FilterLayer *layer is the filter layer in which the filter is installed.