sendit2neeraj@yahoo.com
Posts: 5
Joined: Thu Feb 19, 2009 5:43 pm
Location: India

Memory leak problem

Thu Feb 19, 2009 5:51 pm

Hi,

I've been using franson bluetool in my application for the bluetooth functionality. It seems to be working fine.
Recently, i've noted a slight memory leakage which is about 3-4kb per second ( on an average).I am doing continious device discovery in a thread.
I've also noted that this leak occurs when i call DiscoverDevicesAsync method of the Network class.

Please Help.

Regards,
Neeraj.


neeraj

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Memory leak problem

Thu Feb 19, 2009 6:08 pm

Is this the Widcomm stack?
Or are you getting an excessive amount of RemoteDevice objects?
Both of these are known memory leaks and can't be fixed in the short term.

I suggest you run your device discoveries less frequent or try using the synchronous device discovery in a thread of your own.

Regards,
Jonas

sendit2neeraj@yahoo.com
Posts: 5
Joined: Thu Feb 19, 2009 5:43 pm
Location: India

RE: Memory leak problem

Fri Feb 20, 2009 2:53 pm

It is Microsoft stack.

I also tried synchronous discovery. But that also leads to same amount of leakage.
The memory is not reclaimed even when i do explicit garbage collection.
I'm using .NET Framework 3.5. The memory is not reclaimed even when i execute GC.Collect() method explicitly.
Is franson using unmanaged code. I mean some legacy Win32.

We have to release our application soon.

Regards,
Neeraj

neeraj

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Memory leak problem

Fri Feb 20, 2009 3:22 pm

Yes, it uses a lot of unmanaged code, but I am not aware of any memory leaks on the Microsoft stack.

Try _not_ using the event handler for DeviceFound and see if that helps.

Regards,
Jonas

sendit2neeraj@yahoo.com
Posts: 5
Joined: Thu Feb 19, 2009 5:43 pm
Location: India

RE: Memory leak problem

Fri Feb 27, 2009 6:39 pm

Tried this as well, but no improvement.

Are the source code available for Bluetools ??

Regards,
Neeraj.

neeraj

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Memory leak problem

Fri Feb 27, 2009 11:32 pm

No, the source code is not available.

Regards,
Jonas

Return to “BlueTools”