annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Interface operator : Memory not released

Hello,
In the interface operator provided by Ni “Full-Featured \ CVI”, it would seem that the memory is not released correctly.
By adding the following lines of codes at the end of the hand, one realizes that the number of block and byte are not to 0.
#ifdef _CVI_DEBUG_
{
    unsigned int NbByte;
    unsigned int NbBlock;
    CVIDynamicMemoryInfo (“Fine of the Hand”, &NbBlock, &NbByte, DYNAMIC_MEMORY_SHOW_ALLOCATED_MEMORY);
}
 #endif

A priori that comes from the function:
errChk (TS_LoadMenuBarResourceStrings (gMainWindow.engine, GetPanelMenuBar (gMainWindow.panel), 0, “TSUI_OI_MAIN_PANEL”, errMsg));

In spite of my research, I do not manage to solve the problem.
Somebody would have it the solution or then a track to be exploited.
Thank you in advance for your assistance
0 Compliments
Message 1 sur 12
5 881 Visites
Hello,
To begin,
Wich versions of TS and CVI do you use ?
Best regards
Pierre R...

Certified LabVIEW Developer
0 Compliments
Message 2 sur 12
5 864 Visites
Hello,

TS 3.5
CVI 8.0.0

0 Compliments
Message 3 sur 12
5 864 Visites
Hello,
Someone could it help me ?
Thank you for advances
0 Compliments
Message 4 sur 12
5 790 Visites

Hi:

 

I'm trying out the Resource Tracking window in CVI 9.0 and I see the same problem. The TS_LoadMenuBarResourceStrings function appears to be not freeing memory and some active x objects. I'm using Teststand 4.0.1f1. Any updates on fixing this problem?

 

Cheers,

Dave

0 Compliments
Message 5 sur 12
5 490 Visites

Hello Dave.

 

I found this KB for your problem.

I hope it will help you.

Let me know if it's ok for you.

 

Have a nice day.

Regards.

 

Romain D.
National Instruments France

0 Compliments
Message 6 sur 12
5 469 Visites

Hi:

 

This is not a function call I added myself. If I compile and run the default Labwindows CVI Full Featured User Interface, then the TS_LoadMenuBarResourceStrings call appears to have a memory leak. Are there additional lines of code I can add to free up this memory somehow? If I comment out this line the memory leak goes away (but of course, my menu titles aren't updated correctly).

 

Thanks,

Dave

0 Compliments
Message 7 sur 12
5 466 Visites

Could you give me your code or a part of it which reproduces the problem please?

I will have a look and give you a reply when I know more about this memory leak.

 

Thanks.

 

Romain D.
National Instruments France

0 Compliments
Message 8 sur 12
5 462 Visites

It is the default full featured CVI user interface project. See attached.

If you launch it in debug mode from CVI with the resource tracker enabled, and then close the interface without doing anything, then you should see memory and active x objects not released. I was able to narrow this problem down to the menu function call.

Cheers,
Dave

 

0 Compliments
Message 9 sur 12
5 460 Visites

Hello,

It's not necessary a memory leak.
The memory block allocated you see in the debug not be a memory leak. The memory you see there contains dynamic memory allocated by user (the programmer) and some CVI instrument drivers.
 So in the TestStand example, it uses the TestStand API, UI Controls, Support Library, and Utility Functions. CVI is reponsible to clean up those memory after the execution.
In fact, if you go to any example that is using an instrument driver, such as the XML one in toolbox folder, you will see that it doesn't release all memory at the end either.

 

Regards,

Nacer M. | Certified LabVIEW Architecte

0 Compliments
Message 10 sur 12
5 363 Visites