ws cleanup memory header