Memory Leak when using DirectorySearcher.FindAll()

前端 未结 5 1546
孤街浪徒
孤街浪徒 2020-12-05 13:46

I have a long running process that needs to do a lot of queries on Active Directory quite often. For this purpose I have been using the System.DirectoryServices namespace, u

5条回答
  •  难免孤独
    2020-12-05 14:32

    Have you tried using and Dispose()? Info from here

    Update

    Try calling de.Close(); before the end of the using.

    I don't actually have an Active Domain Service to test this on, sorry.

提交回复
热议问题