Merge "Fix an issue that the FoldStateListener induces a memory leak"