Author Topic: Memory Leak  (Read 14701 times)

Nature

  • Guest
Memory Leak
« on: February 22, 2010, 05:42:22 PM »
Hi there,

I am experiencing a problem with an application which uses WCL, the memory use of the application process is growing at a constant rate of 5MB/hour after a week of continuous use this gets up to nearly a gig. I was wondering are there any common gotchas that I should look out for when using WCL?

I am calling .Dispose() on any WCL objects as soon as I have finished with them. The only objects which stay alive for the entire app lifetime are the wcl.wclAPI and any wcl.wclBluetoothRadio found in an initial call to the wcl.wclBluetoothDiscovery.EnumRadios() method. I also use an instance of wcl.wclAuthenticator with any wcl.wclBluetoothRadio instance.

The application scans, pairs and sends small files to any local devices found.

There might well be issues else where in the application so I will continue looking, just wanted to ask in case there was a common mistake that I might be making.

Thanks

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Memory Leak
« Reply #1 on: February 22, 2010, 05:53:51 PM »
Hi,

if you use MS drivers then it is normal. It is MS drivers issue.

Nature

  • Guest
Re: Memory Leak
« Reply #2 on: February 22, 2010, 06:46:06 PM »
Oh dear, yes it is using he MS stack, thanks Microsoft. Do you know of any work arounds to avoid this? I suppose I could force my application to completely close and restart when memory use reaches a certain limit, do you have any better ideas?

Thanks

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Memory Leak
« Reply #3 on: February 22, 2010, 06:51:46 PM »
Working on it past few weeks. There is one more issue with MS, resource (Handlers) leak. Interesting that it appears only on XP but does not appear on Win 7 and seems on Vista.

So trying to find workaround for those issues.

However, it could be a problem in WCL so if you will face such issue with other stacks - let me know please.

 

Sitemap 1 2 3 4 5 6 7