EWS Managed API 1.1 - Pull Subscriptions Memory Leak

那年仲夏 提交于 2020-02-04 09:01:35

问题


Has anyone else discovered a memory leak issue with Pull Subscriptions (ExchangeService.SubscribeToPullNotifications()) in Exchange Managed Web Services API? When calling PullSubscription.GetEvents() the memory utilization climbs 4K with nearly every polling call. The only way I've been able to keep the memory utilization down is by forcing garbage collection (via GC.Collect()) after every call - an unnecessary path.

I am surprised to see the API hasn't changed for almost a year.


回答1:


This issue was resolved by another post. Essentially EWS was conflicting with another component that failed to release a NetworkStream (due to a SqlException). ANTS memory profiler was used to pinpoint the cause and timing of the issue. Without this profiling tool we would have never discovered the problem.




回答2:


I would say that if a GC.Collect reclaims the memory, there is no memory leak. There is just not pressure on the GC to perform a GC collection, since enough memory is available.



来源:https://stackoverflow.com/questions/7854008/ews-managed-api-1-1-pull-subscriptions-memory-leak

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!