I don't have an answer, but OOI, do you *need* to do a cleanup? Can you not just exit, and let the system sort itself out? Well, it's not my use case. It should fit into a long running process, so it's not a viable option because it leaks resources, in particular it leaks the ppBufferHdr buffer all...