Memory Leak
|
08-28-2012, 07:06 PM
Post: #2
|
|||
|
|||
RE: Memory Leak
(06-06-2012 12:15 AM)supraH2O Wrote: Anyone else notice the new version leaks like a sieve. Even the demos. Yes, We have the same problem. We tried a lot of ways to eliminate the Memory leak but were not able to solve it. As soon as the ApplyMask1.Picture is used to set a new picture the memory is running. The Dispose you suggested is also NOT helping. We also tried to destroy the ApplyMask component and the Internal buffer but the allocated Memory is not freed. (Not even after a GC.Collect() ) Our application is very simple: We have an image from a camera and want to draw an overlay over it before we show it on the screen.  Overlay is changing constantly  We also have to be able to take screenshots (From DSCapture and just before we plot it on the screen) and save them to files on the disk. Does someone know how we can do this on a 64bit system? We did this already with your old library on a 32bit system and there everything is working well. (WITHOUT MEMORY LEAKS)  We used the Generic filter component to draw the overlay and to take the snapshots  For 64 bit systems the Generic filter also have a memory leak o No memory leak if there is no ‘ProcessData’ event o There is a memory leak as soon there is a ‘ProcessData’ event, even if the method is empty. Mitov told us not to use the generic filter component. How can we take screenshots (and save to file) somewhere in the Videoflow without this component? Can someone give us an explenation for all the methods in the ApplyMask class. We cannot find any documentation about most of them. (We also looked on the wiki pages) I added the code as attachment. This is the function where we update the ApplyMask. private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; if (ovIm != null) { if (cloneIm != null) cloneIm.Dispose(); Image tt = applyMask1.Picture; cloneIm = ovIm.Clone() as Image; //I have to make a clone because //You(MITOV) told us to do a dispose and //we don't want to dispose our global image object applyMask1.Picture = cloneIm; //This line in comment is solving the memory leak if (tt != null) tt.Dispose(); } timer1.Enabled = true; } Sample program as attachment VideoLabTest.zip (Size: 14.95 KB / Downloads: 3) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Memory Leak - supraH2O - 06-06-2012, 12:15 AM
RE: Memory Leak - Peter - 08-28-2012 07:06 PM
RE: Memory Leak - Trughbixhix - 01-20-2013, 05:10 AM
RE: Memory Leak - wikooko - 03-22-2013, 11:01 PM
RE: Memory Leak - Peter - 03-23-2013, 06:51 PM
|
User(s) browsing this thread: 1 Guest(s)