Memory increase/leak when using Milestone MediaLiveServiceJPEG component

Hi,

We’re seeing a memory leak/memory increasing when using the MediaLiveServiceJPEG sample to connect to Milestone and get JPEG images. This increase happens when the camera goes offline and we try to reconnect to the Milestone server. We do this continuously until the connection is re-established and the sourceToolkit connection succeeds (if camera is offline or there’s any other problem, there is exception thrown at the line sourceToolkit->Connect() )

Basically:

while(true)

{

.

.

// Login to server

.

.

try

{

sourceToolkit->Connect();

}

catch (const ImToolkitError &error)

{

}

// Delete the Toolkit factory

provider.DeleteInstance(factory);

}

What could we be doing wrong here?

Hi,

Can you tell me how you start and stop the threads.

Is is the same thread that creates the toolkit that also disposes of it?

is there async calls involved?

are you using SSL in the communication?

Hi,

We don’t start and stop threads. As pointed out, this is happening in a while(true) loop. So, you can assume that for this part it is a single-threaded application. There are no async calls and also we don’t use SSL in the communication. We’re using the MediaLiveServiceJPEG sample which comes as part of the MIP SDK samples.

I wanted to modify the sample to see what I would observe, but I find it illogical that you redo the successful login. Please separate those two things and try to see whether the leak is from redoing the login or from creating and deleting instances?

It is unclear to me how exactly you modified the sample. Please make the modified sample source code available, you can do so after the modification not to login when already logged in.