Important: The information in this document is obsolete and should not be used for new development.
CloseCPort
TheCloseCPortprocedure closes a color graphics port. The Window Manager calls this procedure when you close or dispose of a window, and theDisposeGWorldprocedure calls it when you dispose of an offscreen graphics world containing a color graphics port.
PROCEDURE CloseCPort (port: CGrafPtr);
port- A pointer to a
CGrafPortrecord.DESCRIPTION
TheCloseCPortprocedure releases the memory allocated to theCGrafPortrecord. It disposes of thevisRgn,clipRgn,bkPixPat,pnPixPat,fillPixPat, andgrafVarshandles. 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 theGDevicerecord). If you have placed your own color table into the pixel map, either dispose of it before callingCloseCPortor store another reference.SPECIAL CONSIDERATIONS
TheCloseCPortprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.