Try PubSub+

Dispose ITopic?

radekmradekm Member Posts: 4

when using Solace from C# / F# I found out that ITopic is IDisposable. But in the tutorials (eg. the topics are not disposed.

So should I dispose them or it's not necessary and not disposing won't create resource / memory leak?



  • RagnarRagnar Member, Employee Posts: 9 Solace Employee

    IDisposable objects more efficiently release unmanaged memory when Dispose() is called. This guarantees memory is returned to the heap as soon as possible. That said, the Solace C# API will call Dispose() on your behalf if you allow the object to be garbage collected. There won't be a resource or memory leak.

    Hope that helps.

Sign In or Register to comment.