![]() |
TEDispose |
||||
Header: | TextEdit.h | Carbon status: | Not Recommended | |
Removes a specified edit structure and releases all memory associated with it.
void TEDispose ( TEHandle hTE );
A handle to the edit structure for which the allocated memory should be released.
Call the TEDispose function only when youre completely through with an edit structure.
Note that if your program retains a handle to text associated with the edit structure that you are destroying with TEDispose, the handle becomes invalid because the TEDispose function disposes of it, as well as the dispatch structure handle. If the structure is multistyled, TEDispose also disposes all of the style-related handles: STHandle, LHHandle, STScrpHandle, nullSTHandle, and TEStyleHandle.
To continue to refer to the text after youve destroyed the edit structure, you need to make a copy of the handle in the hText field of the edit structure using the Operating System Utilities HandToHand function before you call TEDispose.
In addition to disposing of the edit structure, the edit structure handle, and the dispatch structure handle, the TEDispose function destroys the null scrap associated with the edit structure and releases the memory used for it.
Not recommended in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)