deleting object instance
Posted on 2001-08-04
I have the sort of code snippet below and am curious something about it.
As obviously seen, i am creating a new window object instance and immediately
deleting it, but it's still possible to call the member functions of the object.
void CMenusDlg::OnContextMenu(CWnd* pWnd, CPoint point)
w.Create( .. );
w.FlashWindow( TRUE );
what the heck is this?. i think that instance creation in the local scope
makes the object permanent although the delete operator used. is it safe to use like
this way? i'm confused a little, what do you comment on it?
Thanks in advance.