Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory Leak
06-06-2012, 12:15 AM
Post: #1
Memory Leak
Anyone else notice the new version leaks like a sieve. Even the demos.
Find all posts by this user
Quote this message in a reply
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

.zip  VideoLabTest.zip (Size: 14.95 KB / Downloads: 3)
Find all posts by this user
Quote this message in a reply
01-20-2013, 05:10 AM
Post: #3
RE: Memory Leak
In my opinion you commit an error. Write to me in PM, we will discuss.
Find all posts by this user
Quote this message in a reply
03-22-2013, 11:01 PM
Post: #4
RE: Memory Leak
I made silar observations. Found no way to close the leak.
Find all posts by this user
Quote this message in a reply
03-23-2013, 06:51 PM
Post: #5
RE: Memory Leak
(03-22-2013 11:01 PM)wikooko Wrote:  I made silar observations. Found no way to close the leak.

Dear,

In mean while Boian Mitov replied to my emails and came up with a solution. V5.0.3.9

I see this version is still not on the website.
Boian told me this is a major redesign of the libraries so maybe the release is still in testing phase at Mitov.

I already tested this version and the leak is fixed. Unfortunately I was not able to implement this in my application because other projects were more urgent for the moment.

If you contact me on my private email I will be pleased to send you my latest version. (peterv@soenen.com)

Best regards, Peter
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)