That would be a good idea, yes. I'll give you a little help. Your filter class has a name and a definition. That definition can contain both C-style declarations and function declarations. Two of the latter are special. If there is a function member with the same name as the filter class, then it is the constructor and is executed once when the filter is instantiated. Typically it is used for, you guessed it, initialization of stuff. The other has the same name but with a ~ in front. That is the destructor and is run once when the filter is deinstantiated. Get a basic C++ book and read about class declarations. That's all you really need to understand this aspect of it. Also, look at existing filters to see how they do what you need to do.