Use this forum to read, ask or inform about memory issues in the .NET Framework and third party components.
- Joined:Tue Dec 28, 2021 10:41 pm
Castle Windsor Interceptor Usage
I seem to be experiencing a memory leak when using castle interceptors. I create components via a factory and if I dispose those components they do not get GCed. I'm not sure what I could be doing wrong, or what I need to do to alleviate the problem. Is there a way to unhook the interceptor or I'm I misunderstanding the real problem?
- Joined:Wed Mar 02, 2005 7:53 pm
I'm not sure how interceptors in Castle Windsor are implemented, and it's hard to tell from the screenshot which types belong to Windsor and which are your own types.
The screenshot does show that the disposed LabelViewModelProxy is kept alive as a key in the "instance2Burden" dictionary. Since this is a strong reference, the LabelViewModelProxy instance must be removed from the dictionary somehow, to allow it to be garbage collected. If you have control over the instance2Burden dictionary, I recommend that you try to remove the LabelViewModelProxy instance when it is disposed.
To give you better help with identifying the memory leak, it would be good if you could send us a session file. You can contact us at firstname.lastname@example.org
for information on how to send a session file to us.
SciTech Software AB
Users browsing this forum: No registered users and 3 guests