I think that's your problem then.
windows will only ever let a single application use 1Gb of memory at any one time.
Therefore, if your program uses 750Mb+ (in standalone exe) and is trying to run inside of LabVIEW (which also uses about 250+Mb of memory) this will go over the quota for any one application. In this case it's not just the fact that you aren't getting rid of the memory, it's a case of actually asking for too much memory.
Windows will not let you handle that much memory. I would say that this kind of image manipulation is not possible inside of your application.
I did notice a lot of coerce dots in your program and these will only make matter worse.
I would suggest that you try and optimise the memory that is used inside of your program as much as possible.
The following list provides some guidelines to consider when creating a VI. Though they are by no means the only concepts to consider, they do represent a starting point for optimizing memory use.
- Whenever practical, break subvi's out into the main vi. LabVIE will have to duplicate memory to pass the data to a subvi. you don't want this.
- Limit the use of global and local variables. Using global and local variables causes LabVIEW to generate copies of the data in the variables.
- Display large arrays and strings on open front panels only when necessary. Indicators on the front panel retain a copy of the data which they display.
- Property Nodes cause the front panel of a subVI to remain in memory, which increases memory use. Therefore, if the front panel of a subVI is not displayed, do not leave unused Property Nodes on the subVI.
- Use consistent data types for arrays and watch for coercion dots (grey in LV8.0 and earlier.. red in 8.20) when passing data to subVIs and functions. When LabVIEW changes data types, the output is a new buffer.
- When designing the block diagram, be aware of any areas where the size of an input is different from the size of an output. For example, frequently increasing the size of an array or string generates copies of data which increases the number of memory allocations LabVIEW must perform. This can fragment memory. (this also applies to images) try allocating the image size immediatelly and then just place the images ontop of the allocated image.
These are just some of the suggetions I would give to help you out.
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland