... using Visual Leak Detector, it is found that most of them is caused from the Elektron API. Do you have any workaround for the memory leaks?
mem-leak.txt
Hi @mchiuminatto,
A memory leak is indicative of a problem that needs to be addressed. The only workarounds you can do are to avoid using specific functionality you believe causes the leak. There are many reasons why such an issue can occur and can be extremely difficult to hunt them down.
If you feel the Elektron SDK API is leaking memory, I would instead try to run any tests on a example application as opposed to your price server application. In addition, I would also recommend you download the latest SDK to verify your results. If you still discover leaks within the example application using the latest SDK, I would suggest you post your issue here.
thanks
Hi Nick, thanks for your answer.
I'm aware that this is a tough problem and the reason can range from how we are using the API to the API itself. We will proceed as you suggest. We had the ope that this were a known issue but I seems it is not.
Best regards
Marcello
@mchiuminatto
Most of them are static contant variables defined in emardm.h.
static const thomsonreuters::ema::access::EmaString ENAME_APPAUTH_TOKEN ( "ApplicationAuthorizationToken", 29 );static const thomsonreuters::ema::access::EmaString ENAME_PROV_PERM_PROF( "ProvidePermissionProfile", 24 );static const thomsonreuters::ema::access::EmaString ENAME_PROV_PERM_EXP( "ProvidePermissionExpressions", 28 );
Typically, the lifetime of static variables is the entire run of the program. Therefore, those static variables should be de-allocated by the system when the application exits.
Thank you jirapongse
To set the context, our app "never" stops, it provides real-time price for our systems and needs to be running as long as market is open.
Best regards!!