Re: Memory leak inside Castle

2017-02-21 Thread erazem
I will try with new version and let you know. I have opened dotMemory profiling and this is the result: It shows that there some system collections and

Re: Memory leak inside Castle

2017-02-21 Thread erazem
Maybe this print screen is also of some help: On Tuesday, 21 February 2017 10:58:58 UTC+1, erazem wrote: > > I will try with new version and let you know. > > I

Re: Memory leak inside Castle

2017-02-21 Thread Jonathon Rossi
I don't have the time to really look through all the screenshots to try to guess what is going on, but I was surprised to see so many instances of the controllers living. Can you confirm that your application is calling Release() since it is explicitly calling Resolve(). I'm not sure it'll solve

Re: Memory leak inside Castle

2017-02-21 Thread Jonathon Rossi
You can't use Castle Core 4.0.0 with Windsor as there is no version of Windsor that currently supports Castle Core 4.0.0. On Tue, Feb 21, 2017 at 11:47 PM erazem wrote: > Application is calling Release after each Resolve(). Only dispose on any > controller is not called. >

Re: Memory leak inside Castle

2017-02-21 Thread erazem
Thanks, I didn't know about supporting. If I change extension method to return the same, then controllers are disposed: *public static TInterface AddControllerLoggingFunctionality(this TInterface implementation) where TInterface : class{* *return (TInterface) implementation;* *}* If

Re: Memory leak inside Castle

2017-02-21 Thread Jonathon Rossi
AH, that'll be it, you aren't call Release() on the controller, you are calling it on the proxy you created manually so Release() is just a no-op to Windsor as it doesn't know about that component and so keeps tracking the controller. If you use Windsor's built-in interception support you don't

Re: Memory leak inside Castle

2017-02-21 Thread erazem
Application is calling Release after each Resolve(). Only dispose on any controller is not called. I have updated the library to 4.0.0.0. but get the following error: *Attempt by method 'Castle.MicroKernel.SubSystems.Configuration.DefaultConfigurationStore..ctor()' to access method

Re: Memory leak inside Castle

2017-02-21 Thread Jonathon Rossi
1. I'm not sure if you are asking how it works now or how it will work under Windsor's management. Right now I suspect your interceptor doesn't implement IDisposable so can't be disposed, the same is true for proxies, they cannot be disposed, the .NET garbage collector will clean them up when

Re: Memory leak inside Castle

2017-02-21 Thread erazem
Thanks, thats it, it works now :) Well I have to run test but it seems it works. Just 2 questions more: 1.)Each time you create controller, also new Castle.DynamicProxy.IInterceptor is created and CreateInterfaceProxyWithTarget always create new proxy. Who dispose this objects? 2.)How do you