Difference between revisions of "Midware TMWBuffer.AutoExpand"

From Overbyte
Jump to navigation Jump to search
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
== Definition ==
 
== Definition ==
  
  '''property''' AutoExpand: '''Longlnt''';
+
  '''property''' AutoExpand: Longlnt;
  
 
== Description ==
 
== Description ==
  
AutoExpand property tells the component if the data buffer can be expanded when it is too short for the data that needs to be written to it.
+
AutoExpand property tells the component if the data buffer can be expanded when it is too short for the data that needs to be written to it. The value gives to AutoExpand is the number of bytes that are append at the end of buffer. It default to 256 bytes. If you plan to append lots of data, you should consider making AutoExpand value much larger. If you know how much data to have to add, you could make AutoExpand slightly larger (because of delimiters and escaped characters). If you make AutoExpand to small, then performance is low because there will be a lot of memory reallocation. If you make it to large, memory will be wasted.

Latest revision as of 14:45, 14 May 2011

Main page -> Midware component reference -> TMWBuffer -> AutoExpand

Definition

property AutoExpand: Longlnt;

Description

AutoExpand property tells the component if the data buffer can be expanded when it is too short for the data that needs to be written to it. The value gives to AutoExpand is the number of bytes that are append at the end of buffer. It default to 256 bytes. If you plan to append lots of data, you should consider making AutoExpand value much larger. If you know how much data to have to add, you could make AutoExpand slightly larger (because of delimiters and escaped characters). If you make AutoExpand to small, then performance is low because there will be a lot of memory reallocation. If you make it to large, memory will be wasted.