I have to load an WPF User Control in an MFC Dialog that is being invoked from the ocx control. For this I have created a MFC Regular Dll(Mixed Mode Regular dll with clr option enabled), I have created a Dialog in this which hosts wpf user control using HWndSource. This exported dialog is placed as a child Dialog of thr above MFC dialog that is being invoked from the ocx. Ny intermediate dialog uses C++/Cli code.
When the main MFC dialog is closed, I am deleteing the ptr reference of the intermediate dialog created on the heap.But there after I still see a continous memory leak or growth. In the destructor of the dialog, I am calling the delete on the HWndSource and the the wpf user control, so that its dispose should be called.
But I see a continuous leak there after.
Any help in this regard would be helpful.