Important: The information in this document is obsolete and should not be used for new development.
TEDispose
TheTEDisposeprocedure removes a specified edit record and releases all memory associated with it.
PROCEDURE TEDispose (hTE: TEHandle);
hTE- A handle to the edit record for which the allocated memory should be released.
DESCRIPTION
Call theTEDisposeprocedure only when you're completely through with an
edit record.Note that if your program retains a handle to text associated with the edit record that you are destroying with
TEDispose, the handle becomes invalid because theTEDisposeprocedure disposes of it, as well as the dispatch record handle. If the record is multistyled,TEDisposealso disposes all of the style-related handles:STHandle,LHHandle,STScrpHandle,nullSTHandle, andTEStyleHandle.To continue to refer to the text after you've destroyed the edit record, you need to make a copy of the handle in the
hTextfield of the edit record using the Operating System UtilitiesHandToHandfunction before you callTEDispose. (See Inside Macintosh: Operating System Utilities for more information.)In addition to disposing of the edit record, the edit record handle, and the dispatch record handle, the
TEDisposeprocedure destroys the null scrap associated with the edit record and releases the memory used for it.