07-27-2006 11:28 AM
Hi,
using CVIDynamicMemoryInfo() I found some allocated memory blocks when my application terminates.
I was able to trace the problem down to the Toolbar.fp.
The calls of Toolbar_New() followed by Toolbar_Discard () cause the following printout:
Dynamic Memory Information: End of Execution
Total number of block allocated: 7
Total number of bytes allocated: 184
Block# Address Size Values
0 01cd0068 24 00 00 00 00 03 00 00 00 02 00 00 00 e8 00 cd 01
1 01cd00b0 32 54 53 49 4c 0a 00 00 00 04 00 00 00 00 00 00 00
2 01cd00d8 8 d0 02 cd 01 44 00 00 00
3 01cd00e8 8 b0 00 cd 01 1c 00 00 00
4 01cd00f8 32 54 53 49 4c 0a 00 00 00 04 00 00 00 00 00 00 00
5 01cd0120 8 f8 00 cd 01 1c 00 00 00
6 01cd02d0 72 54 53 49 4c 0a 00 00 00 04 00 00 00 05 00 00 00
Thats not a dramatic issue for me, because I only use a single toolbar in my application, but it might sum up i someone uses many toolbars lets say in a lot of child panels. Unfortunateley in CVI 8.0 the toolbar.c is not part of the delivery so I'm unable to go into more details. Maybe someone at NI can take a look. There was a fromer post in this forum (i guess it was from 2001) that describes the same problem in CVI 5.5 and 6.0, maybe a good time now to remove the issue...
07-27-2006 12:12 PM
The CVI 8.0 toolbar keeps some global information around for coordinating multiple toolbars. This data is cleaned up in an atexit() function and will not be freed when all toolbars have been discarded. This memory should not grow except slightly as you add more toolbars to your program.
Hope this helps,
-alex
07-28-2006 01:25 AM