The current function has the risk of memory leak. Please check the FollowMEDlg.cpp L 590.