More SDF memory cleanup fixes