RTI Connext C# API Version 7.3.0
|
How objects are generally created and destroyed in the API.
How objects are generally created and destroyed in the API.
Some types in the C# API implement the System.IDisposable
inferface and may need to be explicitly disposed to release middleware resources (either by calling Dispose()
or automatically with a using
statement).
Objects in the API can be generally categorized in the following categories regarding their lifecycle:
Type category | Examples | Explicit disposal required? |
---|---|---|
Types that don't implement IDisposable | QoS policies | No. It is always garbage-collected automatically. |
Types that implement IDisposable and are created from a factory type | Entity types, LoanedSamples | Yes. The object and its resources are not released until the object or its factory are explicitly disposed |
Rest of IDisposable types that don't document this behavior explicitly | WaitSet, DynamicData | It's optional. The object can be garbage-collected or explicitly disposed. |
Notes: