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