Important: The information in this document is obsolete and should not be used for new development.
TEDispose
TheTEDispose
procedure 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 theTEDispose
procedure 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 theTEDispose
procedure disposes of it, as well as the dispatch record handle. If the record is multistyled,TEDispose
also 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
hText
field of the edit record using the Operating System UtilitiesHandToHand
function 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
TEDispose
procedure destroys the null scrap associated with the edit record and releases the memory used for it.