Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods / CyberStream


ReleaseBuffer

Releases a buffer to this Cyberdog stream.

void ReleaseBuffer (in Ptr buffer);
buffer
A pointer to the buffer that is to be released.
DISCUSSION
This method returns a memory buffer that was retrieved by calling GetBuffer. If you do not release buffers for reuse by the stream, it may eventually run out of space for incoming packets and begin dropping them, degrading download performance.

You can determine whether a stream's supply of buffers is low by calling the GetStreamStatus method and checking the value of the kCDBuffersAreLow flag.

When a stream object is destroyed, its buffers are deallocated.

ReleaseBuffer may be called at interrupt time.

If you subclass CyberStream, you must override this method. Your override must not call its inherited method; that is, your override method must implement this method's functionality completely.

SEE ALSO
The StreamStatus type (page 179).
The GetBuffer method (page 382).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996