T O P I C R E V I E W |
quantuz |
Posted - Jan 25 2014 : 19:35:19 Hi!
I have a low memory problem wich maked IE stop updating the display bitmap when I try to show more bitmaps in my single ImageEnView. I have an array of many TIEBitmap object wich I show on my view with SetExternalBitmap(), the display freez with the same image displayed even if I try to show another with SetExternalBitmap(). Then if I delete one of my TIEBitmap object in my list the display start working again. A new TIEBitmap object is allocated and displayed until I get the freez, the is no hang or exception the display just dont update.
ImageEnView1->SetExternalBitmap(myTIEBitmap);
Is this a known behaviour of IE? And how can I know when IE is in troble, so I can free up some memory?
Regards, //Christer Strandh
|
5 L A T E S T R E P L I E S (Newest First) |
quantuz |
Posted - Feb 09 2014 : 16:31:49 Hi! I tried the ievContour->Blank(); call but the problem remains. I could free up memory if I just find a way to detect that IE is out of resources, is there a way to detect that? //Christer
|
spetric |
Posted - Jan 28 2014 : 16:05:46 Well, I don't have any problems with that. Beside setting externalbitmap to 0, I often call Blank function. Currently, I'm using external bitmaps in ImageEnView for showing image contour. When my object (TImageContainer), that holds images and masks changes (due to switching images), I set new external bitmap:
//--------------------------------------------------------------------------- void __fastcall TFormContour::UpdateContour(TImageContainer *imageContainer) { ievContour->SetExternalBitmap(0); ievContour->Blank(); if (imageContainer) { if (imageContainer->ImageContour) ievContour->SetExternalBitmap(imageContainer->ImageContour->ieBitmap); } } Maybe you should call Blank() method prior to setting new external bitmap. SetExternalBitmap does not make copy of original image...as far, as I know.
|
quantuz |
Posted - Jan 28 2014 : 15:50:01 Hi! Thansk fo the tip, I had already in some places set SetExternalBitmap(NULL); but not all places, added SetExternalBitmap(0) to all places I used it but the same problem. I have my IEBitmap's atttached to my own class object and when I want to show it I use SetExternalBitmap. I could try to assign(copy) them to a single display IEBitmap, but I want to avoid any copying, I asume SetExternalBitmap() dont make any copy?
//Christer
|
spetric |
Posted - Jan 27 2014 : 06:32:47 I had similar problems (version 3.0.2) and the solution was simple: Before changing external bitmap set PaintView iebitmap to zero: PaintView->SetExternalBitmap(0); PaintView->SetExternalBitmap(someIEBitmap): |
w2m |
Posted - Jan 26 2014 : 08:14:21 It has been my experience that you should only call SetExternalBitmap one time. The best way to show different bitmaps is to assign them from your array or use TIEImageList defined in hyieutils.pas to hold your images. Also you can usually eliminate memory problems by compiling as Win64. My EBook has some examples on how to use TIEImageList.
I have one question for you though. How many images are in your array and what are the dimensions of the images?
William Miller Adirondack Software & Graphics Email: w2m@frontiernet.net EBook: http://www.imageen.com/ebook/ Apprehend: http://www.frontiernet.net/~w2m/index.html
|