-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix a memory leak #2605
base: 1.x-WorkingBranch
Are you sure you want to change the base?
Fix a memory leak #2605
Conversation
Dispose the object returned by CreateLinkedTokenSource(...)
Let's loop in @khellang and this one as he worked on it previously. Thanks |
I understand this issue does not exist in v2.00. But can you update v1.4.3 so Nuget can give me a bug-free 1.x version ? |
Oh sorry, you're sending this to the |
Wow, I really like to contribute to this project, we have such an active people like you! Thanks! |
This will just bring back the bug that #2150 tried to fix. We need to figure out exactly what and when we're leaking memory here... |
Looking at the original fix for #2150 it looks like I may have missed a |
I think this is worth fixing for a new 1.4.x release of Nancy, along with #2616. What's the next step here? We certainly won't bring back the behavior of this PR as it currently stands. |
@yzhou88 Are you able to provide a bit more information as to when it's leaking memory? Is it per request, or only in certain scenarios? You can use something like dotMemory to profile and see what's going on. When I profiled #2113 a long time ago, it was pretty easy to see exactly what was leaking 😄 |
@jeffthiele-iq What about the case of serving static content? It seems that the |
Yeah you're right @cloudhunter89, it isn't disposed correctly for static content. None of my testing used static content so I missed that. |
Prerequisites
Description
Dispose the object returned by CreateLinkedTokenSource(...)
I have spent around 6 hours working on memory leak issue. After applying the change here, no memory leak anymore.