07-20-2012 09:04 AM
I did some more testing to be sure:
Below an image which shows on top the program with disabled light meter, bottom with enabled light meter.
The left images are the through memory usages; on the right, always the maximum
you see that on the bottom right image, the memory usage slightly increases, top right not.
all done with your vi (normal while loop)
Bruno
07-20-2012 09:05 AM
When performing check in builded application you should change instance name (otherwise LabVIEW's memory shown instead of application on the graph):
As you can see also in builded application it works stable for me. Not sure which memory exacly you checking in Task Manager, but working set and private memory both are stable (well, they changed +- 3 MB as you can see, but over long time they are stable). In Task Manager I also don't see any leakage for the application.
07-20-2012 09:12 AM - edited 07-20-2012 09:14 AM
@Biebel wrote:
you see that on the bottom right image, the memory usage slightly increases, top right not.
Yep, I see.
Try to insert IMAQ Clear Overlay directly before Light Meter:
(or turn off Show Search Area)
Andrey.
07-20-2012 09:13 AM
In my previous post, i changed the instance name to application..
Bruno
07-20-2012 09:24 AM
@Andrey Dmitriev wrote:
@Biebel wrote:
you see that on the bottom right image, the memory usage slightly increases, top right not.
Yep, I see.
Try to insert IMAQ Clear Overlay directly before Light Meter:
(or turn off Show Search Area)
Andrey.
with the IMAQ clear overlay between the nodes, it's stable here.
I'll use that solution allthough I see that the through problem is in the light meter itself (not clearing all its memory every time)
Thanks!
07-26-2012 08:28 AM
Hello Biebel,
Actually, Andrey is right, it is caused by the "IMAQ Overlay ROI" function which is called inside the "IMAQ Light Meter" function.
When using overlays, you also have to clear them from memory when you don't need them anymore.
Thus, this is a normal behaviour.
See the link hereafter for more information: http://digital.ni.com/public.nsf/allkb/1C3A98C53018B57286256E510080B3ED?OpenDocument
07-27-2012 01:59 AM - edited 07-27-2012 02:01 AM
@cedhoc wrote:
Thus, this is a normal behaviour.
See the link hereafter for more information: http://digital.ni.com/public.nsf/allkb/1C3A98C53018B57286256E510080B3ED?OpenDocument
No! This is absolutely not normal behavior from software engineering point of view.
By default overlay is turned on in Light meter. In typical use case scenario I need measurement information only and not an overlay:
At least default value for Show Search Area should be set to FALSE. (CAR is required)
In ideal case this function should not produce memory leak also when Show Search Area is TRUE. That can be done if overlay will be added into internal Group, and cleared before each call.
Take a note - in typical use case scenario ROI is not changed, so the overlay added into same place again and again - visually you can't see any differences.
In general if someone has allocated some resources, then he is responsible for releasing these resources (see, for example ~Temp Light~ image inside of Light meter). This is difference between this "High level" function and the "Low level" functions listed above in given link.
Andrey.
08-01-2012 08:55 AM
Hey Andrey,
Thanks for the update.
Actually, what I meant by normal behavior is that the "IMAQ Light Meter" function works exactly as stated on its specification (see this LabVIEW Help excerpt: "Image Out is a reference to the result image. The search area may be overlaid on the image according to the setting Show Search Area."). We are thus absolutely not confronted to a bug here.
That said, I totally understand your point of view. I agree the default value would better be set to False. For the rest, this is more a question of what functionality you want to add in your VI, and I guess it can be an endless discussion 🙂
What I propose then is that you can perhaps add a post on the Idea Exchange forum (ni.com/ideas) on that matter?