YES YES YES! You should release all memory YOU allocate in your program
before it exits. It WON'T interfere with the System's cleanup. That uses
SysFreeByOwnerID() or something to that effect which walks the allocated
chunks in the dynamic heap and frees any chunk whose owner ID is the same
as the APP which just exited.

There are ways to get around the problem you mention in the 2nd paragraph;
you just need to make that part of the code a little cleaner. There's no
technical reason that you can't do what you mention.


Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293


>Hi all,
>
>should I delete the chunks, allocated in InitApplication() in
>CloseApplication()? More specificly, the ones, associated with UI controls?
>As long as I know, I could not do it since all memory, allocated by my
>application will be freed by the system after the aplication exit.
>
>The problem is, for some reason I sometimes want to goto _back_ to
>InitApplication() right after CloseApplication(), i.e. to restart the
>program, but without leaving the thread. The problem is, once
>CloseApplication() is invoked (and UI-assigned memory is freed by the
>program) further operations on that memory cause errors, although it's
>allocated and set correctly again in InitApplication().
>
>Any suggestions?
>
>Bobby
>
>
>
>
>Bobby Kolev
>Software Engineer,
>Interactive Edge LLC.
>email: [EMAIL PROTECTED]
>work:   (212) 462 49000 ext.216, voice #257
>home: (718) 349 1030
>
>----------------------------------------------------------------------------
>---------------
>Shoot-To-Win



Reply via email to