Buffers (saved record buffers)

Top  Previous  Next

 

 

Buffers

&BufferQueue, PROTECTED

The Buffers property contains saved copies of the record buffer for the managed file. The saved record images may be used to detect changes by other workstations, to implement cancel operations, etc.

Implementation:

The SaveBuffer method stores a copy of the current Buffer contents into the Buffers property and returns an ID which may subsequently be used by the RestoreBuffer method to retrieve the buffer contents.

The RestoreBuffer method releases memory allocated by the SaveBuffer method. Therefore, to prevent a memory leak, each call to SaveBuffer should be paired with a corresponding call to RestoreBuffer.

Buffers is a reference to a QUEUE declared in ABFILE.INC as follows:

BufferQueue  QUEUE,TYPE  !Saved records

Id            LONG       !Handle to recognize saved instance

Buffer        &STRING    !Reference to a saved record

            END

See Also:     Buffer, RestoreBuffer, SaveBuffer