LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Does ListRemoveItems() leave 0's after removing?

Whats left in the list after this function call?

0 Kudos
Message 1 of 4
(2,641 Views)

Hi zr1rob,

 

According to the CVI help, ListRemoveItems's prototype is:

void ListRemoveItems (ListType list, void *itemsDestination, ssize_t firstItemToRemove, ssize_t numberOfItemsToRemove);

 

The function removes a specified number of consecutive items from a list. If itemsDestination is not zero (0) then the contents of the items will be copied to itemsDestination after the items are removed.

 

Ioan **bleep**arasan || National Instruments

0 Kudos
Message 2 of 4
(2,620 Views)

thanks for the reply, but thats just repeating what the 'help' says. It doesnt answer as to whats left in the list after the data is removed.

 

Does the act of removing the existing data clear (turn to 0) the list or is there some default value left in the list?

 

0 Kudos
Message 3 of 4
(2,616 Views)

I tend to answer 'No' since ListRemoveItems simply rolls data back with a memmove but does not deallocate internal memory nor it clears/initializes it: that memory area maintains previous content. The source code for toolbox instrument is distributed with CVI so you can check it by yourself. The instrument guarantees that you are not permitted to read past the active number of items from the list, but memory is neither cleared nor effectively released until the list is in effect.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(2,597 Views)