What happens if DOF resources aren’t freed?

1
0

Specifically, in the DOF Connectivity guide, it mentions that the destroy method for DOF should always be called. However, what happens if you don’t call that method? Does the connection still terminate on other nodes just perhaps at a much later time or does it stay open indefinitely?

RESOLVED
Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on June 5, 2015 10:52 pm
233 views
2
Private answer

There are a number of resources that are used by the DOF, such as threadpools, connections, servers, authenticators, and several other objects. If you do not call the destroy method, these will continue to exist in the background as long as your application runs, using memory and keeping connections open. This is considered a “leak”, since the resources cannot be reused for your application.

Of course, when your application terminates, then the resources will be reclaimed by the operating system, but any other nodes you were connected to may take some time to discover the connection has gone away. It’s not very “nice” to those other nodes, and can cause excess work in the network to “clean up.”

It is certainly best practice to get in the habit of calling the destroy method when you are done with the DOF. However, it won’t break anything (other than maybe your own app) if you forget.

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on June 9, 2015 7:42 am

yes

( at April 20, 2017 2:24 am)