Hi Antonio,

> Hi.
> I'm trying to modify the information shown in foreground, but I have some
> problems...
> How can I modify a ImageForegroundPtr without clearing the foreground and
> pushing back the ImageForegroundPtr every time?

AFAIK you can just modify the Image used in the ImageForeground, you do not 
have to remove the Foreground (or the Image) for that.

> Why this 2 lines of code (called at every viewport update) make the
> allocated memory grow?

quite often this is just the ChangeList recording your modification to a 
FieldContainer, unless you turned off ChangeLists explicitly ?

> beginEditCP( viewport );
>       viewport->getForegrounds().clear();
>       viewport->getForegrounds().push_back(  imf  /*imf is the
> ImageForegroundPtr */ );
> endEditCP( viewport );                
> 
> Is it possible that the foreground is not deleted calling the method
> clear()? what should I call?
> I also noticed a big framerate drop.

The Foregrounds are not deleted, if there are still references to it after it 
was removed from the viewport. Given what you said above the ImageForegroundPtr 
imf is probably already in the list of foregrounds of the viewport, so calling 
clear will not delete the object, since you still have a pointer to it (the 
pointer is the one called imf, of course). (If you find that confusing, 
consider what would happen if the clear call would actually delete the 
Foreground, regardless of the still existent pointer imf - imf would then point 
to already free'ed memory)

> I think I can't use the SimpleStatisticsForeground because I'm working
> with a MultiDisplayWindow and I saw in another mail that these two things
> don't work together...
> 

I can't comment on that, sorry. Maybe someone else can ?

   Cheers,
     Carsten

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to