nanogui: memory usage


Previous by date: 28 Nov 2006 22:41:37 +0000 Re: memory usage, Greg Haerr
Next by date: 28 Nov 2006 22:41:37 +0000 KDGKMODE: Invalid argument, Giacobbi Giacomo
Previous in thread: 28 Nov 2006 22:41:37 +0000 Re: memory usage, Greg Haerr
Next in thread:

Subject: Re: [nanogui] memory usage
From: Junior ####@####.####
Date: 28 Nov 2006 22:41:37 +0000
Message-Id: <11269CF426A.000007F9ejr@inbox.com>

>> It looks like if I select an image from this array and map the window,
> then later timeout and remap the same image (this may happen several
> times),
> that seems to be where the memory usage problem is. Since, this image_id
> (for GrDrawImageToFit()) is fixed in the array, and simply reloaded, I'm
> not
> sure why it would use additional memory.
> Do I need to FreeImage first? If so, I'll have to reinit the array which
> shouldn't be necessary. What about GrDrawImageFromFile()? What happens
> when
> the window is unmap?
> 
> GrDrawImage* functions have nothing to do with window map/unmap.
> The draw image functions use an internal id to reference a server-stored
> data structure that has the bits used to draw the image.  The application
> program then uses these bits as the source to draw on a window.
> 
> GrFreeImage should be called when you will no longer be referencing
> the image you're requested the server to store.

I went ahead and use FreeImage regardless (that is, as long as it's not used), and so far that seems to be working.
I'll have to revisit my approach in light of this.

Much Thanks,
--Jr.



Previous by date: 28 Nov 2006 22:41:37 +0000 Re: memory usage, Greg Haerr
Next by date: 28 Nov 2006 22:41:37 +0000 KDGKMODE: Invalid argument, Giacobbi Giacomo
Previous in thread: 28 Nov 2006 22:41:37 +0000 Re: memory usage, Greg Haerr
Next in thread:


Powered by ezmlm-browse 0.20.