New topic: 

memory allocated by browser increases when displays images

<http://forums.realsoftware.com/viewtopic.php?t=45688>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        matrub          Post subject: memory allocated by browser 
increases when displays imagesPosted: Tue Oct 23, 2012 7:13 am                  
       
Joined: Tue Oct 23, 2012 6:53 am
Posts: 1                Hallo 

I am trying to use real studio 2012r1.1 to transfer images from a webcam and 
showing them in a web page

I have created an external dll, which is able to pass in a memory block the 
image acquired by the camera, in jpg encoding

with MyPicture = picture.FromData(MyMemoryBlock) i am able to convert it in a 
picture. When i visualize it using a WebImageView, assigning the image as

MyWebImageView.Picture = MyPicture

I see that the memory in charge to the browser grows a lot, and after some 
minutes i saturate the phisical memory

I did also the test of loading only two images from disk, and switching them in 
the same WebImageViewer, the problem persists, the only possibility to avoid it 
is forcing the images to be in cache, with the instruction MyImage.preload()

As you see, in my application i cannot put all the images in cache because they 
change dinamically, so my hipotesys is that
if the image is new, the browser allocates it with "new" and push the image in 
cache, if it is already present in cache, it simply charges it, without 
allocations.

My question is: is it possible to control the behaviour of the browser, forcing 
not to use cache and make and explicit free of memory when the image is no 
longer used?

In my idea, when the browser receives a new image, should show it, avoiding to 
put it in cache, and the next visualization should let "old" images free

thanks for your help

Matteo   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to