G
Guest
I creat a view in MyDlg using
m_pview=new MyView();
I am not sure where I should delete m_pview.
I called destroywindow in MyView and MyDlg, I have tried to delete m_pview
in destructor of MyView or MyDlg or PostNcDestroy() function , but all failed
because "Access violation" at line "delete m_pview".
If I don't delete m_pview, there is "memory leak" at line "m_pview=new
MyView()".
I have no idea about that. Any help or suggestion is appreciated!
m_pview=new MyView();
I am not sure where I should delete m_pview.
I called destroywindow in MyView and MyDlg, I have tried to delete m_pview
in destructor of MyView or MyDlg or PostNcDestroy() function , but all failed
because "Access violation" at line "delete m_pview".
If I don't delete m_pview, there is "memory leak" at line "m_pview=new
MyView()".
I have no idea about that. Any help or suggestion is appreciated!