Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 akka.net 可能会发生内存泄漏,因为它消耗大量内存并且一直在增加
我应该每次都创建一个新演员还是更早地将其创建为静态?
在没有进一步上下文的情况下:
Actor 本身是轻量级的并且可以快速创建,因此您可以在需要时随意创建它们。完成它们后,请确保使用 Context.Stop(Self) (或停止演员的替代方法之一)摆脱它们。