My problem with delete of the output sequence was caused by new and delete overloading (not even in my code!). Therefore I am linking now with static libraries and not using dynamic libraries. Thanks for everybody who replied. Gena