Important: The information in this document is obsolete and should not be used for new development.
CloseCPort
TheCloseCPort
procedure closes a color graphics port. The Window Manager calls this procedure when you close or dispose of a window, and theDisposeGWorld
procedure calls it when you dispose of an offscreen graphics world containing a color graphics port.
PROCEDURE CloseCPort (port: CGrafPtr);
port
- A pointer to a
CGrafPort
record.DESCRIPTION
TheCloseCPort
procedure releases the memory allocated to theCGrafPort
record. It disposes of thevisRgn
,clipRgn
,bkPixPat
,pnPixPat
,fillPixPat
, andgrafVars
handles. It also disposes of the graphics port's pixel map, but it doesn't dispose of the pixel map's color table (which is really owned by theGDevice
record). If you have placed your own color table into the pixel map, either dispose of it before callingCloseCPort
or store another reference.SPECIAL CONSIDERATIONS
TheCloseCPort
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.