LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

memory leaks on .NET controller

Hello,

I'm currently working on an application which uses a .NET controller.
I've started from the DLL file provided by a third party.
They also provide a standalone testapp that uses the same library and this is working fine. (testapp not in CVI)
Now when I start my program, initialize the library and start accessing it my memory keeps growing.
Every time I access the function my memory usage grows.

I've used the function CVIDynamicMemoryInfo() to check my functions but this used memory stays the same.
It's only the memory in the task manager that keeps growing.

Any ideas? How does CVI manage the resources of a .NET controller?
Is there a way to free these resources?

Best regards,

Gerrit

0 Kudos
Message 1 of 2
(3,086 Views)
Hi Gerritt,

Without seeing some sample code, its hard to guess as to what is actually going on. However, there are certain scenarios when calling .NET assemblies in which you must free the memory yourself using the CDotNetFreeMemory function. I would suggest that you read through the Managing Resources topic in the CVI Help. This has some great information regarding managing memory when working with .NET assemblies from CVI.

Best Regards,


Message Edited by Jonathan N on 04-28-2008 07:04 PM
Jonathan N.
National Instruments
Message 2 of 2
(3,011 Views)