[experiment] fixed memory leaks.