Page 1 of 1

Memory High on RVMedia

Posted: Wed Apr 13, 2022 7:38 pm
by cueiogordo
I use RVMedia to make a stream and capture the image with GetCurrentImage and put it in a TIMAGE.
When performing the process, the system increases the memory. Using ReportMemoryLeaksOnShutdown := True;, returns the attached image.
If I don't use the process, no error happens.

Re: Memory High on RVMedia

Posted: Thu Apr 14, 2022 8:38 am
by Sergey Tkachenko
You should use one of two methods to get the image:
1. RVCamera.GetSnapShot. In this case, you must free the returned object yourself.
2. In RVCamera.OnGetImage, use Img parameter. Do not free Img, but do not use it outside this event (copy to your image)

Re: Memory High on RVMedia

Posted: Thu Apr 14, 2022 11:52 am
by cueiogordo
Good Morning
Solved problem.

Grateful

var ImageWrapper: TRVImageWrapper;
begin

try
ImageWrapper := RVCamera.GetSnapShot;
Image.Picture.Graphic := ImageWrapper.Bitmap.GetBitmap;
ImageWrapper.Free;
EXCEPT
end;