Skip to content

Memory Leak in .Net SDK #323

@sagarok

Description

@sagarok

🐛 Memory Leak: LSEG .Net SDK objects not released after OmmConsumer uninitialization

Description

We are using Refinitiv .Net SDK in a service built on ASP.NET Core.
Following the examples provided, we create an OmmConsumer, subscribe to approximately 30,000 snapshot datapoints, and register a client to process incoming messages.

After all datapoints are received and processed, we uninitialize the consumer and all created objects were disposed. These objects are properly garbage collected and removed from memory.

However, a large number of internal objects from the LSEG.* namespaces remain in memory and are not garbage collected.

This process is repeated multiple times in response to incoming requests from an API endpoint. After each operation, the amount of memory occupied by LSEG.* objects increases significantly and is never freed, suggesting a potential memory leak within the SDK.


Steps to Reproduce

  1. Create an OmmConsumer following the SDK examples.
  2. Subscribe to ~30,000 snapshot datapoints.
  3. Process all received messages.
  4. Uninitialize the consumer and dispose of all created objects.
  5. Monitor memory usage before and after each iteration.

Expected Behavior

All resources associated with OmmConsumer and related LSEG.* objects should be released after uninitialization, allowing memory to be reclaimed by the garbage collector.


Actual Behavior

Memory usage continues to grow after each operation.
LSEG.* objects remain in memory and are not collected by the GC, resulting in continuously increasing memory consumption.


Environment

"LSEG.Eta.Core" Version="3.4.0"
"LSEG.Eta.ValueAdd" Version="3.4.0"
"LSEG.Eta.Ansi" Version="3.4.0"
"LSEG.Eta.AnsiPage" Version="3.4.0"
"LSEG.Ema.Core" Version="3.4.0"

  • SDK version: 3.4.0
  • **.NET version: 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions