Tim Astle wrote in message <[EMAIL PROTECTED]>...
>
>Okay, this is probably a stupid question, but I'd like an answer nontheless
>:-)
>
>Is the following an adequate way of telling whether or not a handle has
been
>freed?
>
>if(handle != NULL)
> MemHandleFree(handle);
Not complete. Assume the value in "handle" is a handle with the
value of 0x1234. Calling MemHandlFree() will free the memory
referenced by that handle ... but it will NOT change the data stored
in your variable called "handle" ... so if you get back to this place
in the code "handle" will still contain 0x1234, and you will call
MemHandleFree() again and you will blow up. Try this:
if (handle != NULL) {
MemHandleFree(handle);
handle = NULL;
}
>
>The reason I'm asking this is because I'm trying to free text handles in a
>table upon exiting of the form. I'm not sure if the form is freeing them
>for me or not. I can't seem to find any information on this. This is the
>error I'm getting:
>
>MemoryMgrNew.c, Line:4177, FreeHandle
>
>I believe this could only appear if I'm trying to free something that has
>already been freed or a locked handle.
Quite possible if you don't reset the variable after you free the handle.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/