Fixed memory leak in stream engine

Was not destroying mechanism.