03-27-2013 11:37 AM
Yes I have a producer consume QMH currently. If using dequeue is it possible to dequeue one element only at a time?
03-27-2013 11:42 AM
A dequeue only pulls 1 element off the queue at a time.
04-10-2013 06:59 PM
Does use of Array subset and replace array (as used in circular buffer posted in original post) could have potential memory leaks when running with large set of data? Has anyone used the circular buffer and seen any memory issues?
04-11-2013 02:40 AM
@sonotk wrote:
Does use of Array subset and replace array (as used in circular buffer posted in original post) could have potential memory leaks when running with large set of data? Has anyone used the circular buffer and seen any memory issues?
I don't see any reason for leaks there, because the LV memory manager is generally good. What you will get is a need for an allocation when you read the data out, but that exists with all other implementations where you have to create a copy of the data. From what I understand of the LV memory manager, it should reuse the memory the next time around if possible, but those are all implementation details.
The only way I can think of to avoid the copy is to work with the data inside the subVI. The array subset primitive actually returns a copy to the original data and if you don't give LV a reason to copy it (such as taking it out of the subVI), it will not create a copy. That, of course, prevents you from using the VI as a general circular buffer.