If a PingObject wanted to access an output file, its constructor might contain the following code:
PingObject::PingObject() {
:
:
numOutFiles = 1;
outFileQ = new FileQueue[1]("ping_output.out");
:
:
};
The application programmer does not have to worry about deallocating the outFileQs. The kernel takes care of flushing and closing the physical file, and deallocating the FileQueues.