nanogui: memory usage
Subject:
Re: [nanogui] memory usage
From:
"Greg Haerr" ####@####.####
Date:
23 Nov 2006 08:21:00 +0000
Message-Id: <17a501c70ea3$9df0a380$6401a8c0@winXP>
> Does the server destroys the GC contexts created once a function closes?
GC contexts are created using GrNewGC(), and are not destroyed
until the GrDestroyGC call is executed. This allows context state
information to be quickly available in the server for all draw functions,
which require a drawable (window or pixmap) and GC.
> would it be a problem to explicitly destroy these just to be sure the
memory is freed?
When you're done using a GC for good, you'll definitely want to destroy
them, especially if the code loop calls GrNewGC again.
> When I unmap a window, does it relinguishes any memory?
No. Unmapping a window just causes the server to send expose
events to all windows underneath the unmapped window. The
window structure stays around, unchanged following map and
unmap calls.
Regards,
Greg