>Let me ask a question about this.  You say 'the pointer becomes invalid'.
>Is it just that the pointer variable becomes invalid after unlocking and
>that the actual memory allocated is STILL valid, somewhere (referenced by
>the handle)?

The handle is still valid and so is the memory. The pointer value may
change once the handle is unlocked. It's not really invalid, it's just a
moving target with a value you can't depend on.

>If so, when and/or where should that chunck be released to free up memory,
>when no longer used?  Does exiting a program release it?  Is it even
>necessary to manage the deletion of these chuncks?

When no longer used. Exiting releases it, but it's generally considerd a
bad idea to depend on the system to clean up your trash. For every
allocation, you should have an expliciit deallocation. I'm ignoring
database records, which are basically "permanent" memory chunks.

Regards,
Steve MAnn

-------------------------------------------
Creative Digital Publishing Inc.
1317 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.788.0138              805.593.3811 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com


Reply via email to