12-08-2013 09:53 PM
I have the following line in my code:
Algorithms.Cast(OrigImage, tempRGB, ImageType.Rgb32)
OrigImage is a U8. It appears to have a 7mb memory leak.
Before: 81168K,
After: 88560K
Has anyone else noticed this? Is there a fix?
Note: I properly dispose of all images when I am done using them.
Thanks!
12-13-2013 05:09 PM
Hi Steverino,
I checked our database but I wasn't able to find any documentation about this issue. Have you been able to make any progress on this since it was posted?
12-15-2013 10:31 PM
I am not sure I know what you mean by making progress. Unless I am missing something, I am convinced the error is with the library. I spent a couple of hours trying to locate the source of the momory leak in my code and believe I found it.
I am wondering if someone at NI or another user can confirm this.
12-16-2013 03:18 PM
Can you describe the situation a little bit more? What memory are you refering to when you say "Before: 81168K, After: 88560K"? Are you talking about the total amount of memory reserved by the application?
The cast function will convert an image of one type to another. If you were going from a U8 image to an RGB 32, the new image would require about 12 times the memory as the original image. 7 Mb would be a reasonable amount of memory increase for this process.
Jeremy P.
12-16-2013 08:29 PM
I understand what you're saying. The problem is that the memory is not reclaimed after doing an image.Dispose on the newly created image.
Try it out for yourself and see if you get a similar result. Maybe l'm missing something.
Thanks!
12-19-2013 03:58 PM
Hi Steverino,
When you use the dispose function, is no memory reclaimed at all, or is only the extra memory from using the cast function to convert reclaimed?