From: ivan@vianet.net.au
Date: Sat 03 Apr 1999 - 16:53:33 IDT
Hello again, I have just started working with virtual contexts and have noticed that I cannot use gl_freecontext() to release the memory allocated by gl_allocatecontext() unless the context is a virtual context. This wouldn't be a problem except that, following the example given in testgl.c (/demos of the source installation) I also allocate a context for the physical screen. The source shows that gl_allocatecontext() is a call to malloc() and so I assume, for proper memory management, I should release all memory allocated. How then do I change the physical context to a virtual context for the purposes of freeing memory ? Or maybe I should use free() for the physical screen ? Using free() seems to defeat the purpose of having gl_freecontext() and the fact that gl_freecontext() explicitly requires a virtual context indicates some danger in just calling free(). BTW I notice the documentation for gl_getcontext() in fact recommends freeing memory using free() and does not mention gl_freecontext() at all. Is this an error in the documentation ? TIA Ivan.
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST