« Developer Day 2010 | Main | Resource Management in Interop Scenarios »



Feed You can follow this conversation by subscribing to the comment feed for this post.


I have followed the way you have suggested in hosting a wpf user control in an MFC modal dialog. I have used the HWndSource to wrap the wpf control and embedded that as a child in MFC dialog application.

Everytime I have closed and open the MFC dialog, I see a continuous memory growth, the previous allocation does not seems to be fired.

In the wpf user control's dispose method, I have set the references of all the objects that I have used to null. In the destructor of the dialog, I have called the delete on HWndSource and Wpf User Control, so that the dispose is getting called, but I still see memory not being released


Naveen, I've added information in my next blog entry: http://weblogs.thinktecture.com/cnagel/2010/07/resource-management-in-interop-scenarios.html. You did all this? How big is the additional allocation every time the dialog is opened? Maybe it's just memory from the managed heap until the GC cleans up.


i have created one wpf user control having some textboxes.
this user control i hosted in MFC application using your approach.while running this application i am not able to edit values in the textboxes. can u help me.

קניית דומיין

Your work is inventive and valuable. Thank you for this fascinating post! Attractive section of content. Your blog is great for anyone who wants to understand this subject more. This is great stuff.

The comments to this entry are closed.

IMPORTANT: This is archived - and quite likely outdated - content, only kept online for reference purposes

Please visit thinktecture.com for up-to-date technical content.