大字串的读入 |
缺席
|
KFC
一般會員 發表:43 回覆:73 積分:23 註冊:2003-03-27 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
|
KFC
一般會員 發表:43 回覆:73 積分:23 註冊:2003-03-27 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
From Delphi help on TStringList: Indicates the number of strings the string list has allocated memory to hold. Delphi syntax: property Capacity: Integer; C syntax: __property int Capacity = {read=FCapacity, write=SetCapacity, nodefault}; Description Use Capacity to find out how much memory is available for holding strings, or to reallocate the memory to allow more or fewer strings. Capacity is the number of entries in the string list that have been allocated, as opposed to Count, which is the number of strings in the list. Thus, Capacity is always greater than or equal to Count. Adding new strings will cause the Capacity property to increase if necessary, but setting the Capacity property will not change the Count property. Do not set Capacity to a value less than Count, or the list will be truncated and Count will indicate that the list contains more strings than is the case. Also, if Capacity is set to a value less than Count, the memory used to store the strings that are dropped from the list (as opposed to the entries in the list that point to those strings) is not freed. Avoid passing strings by value when dealing with huge strings. So using const and var in your functions would be better.
|
timhuang
尊榮會員 發表:78 回覆:1815 積分:1608 註冊:2002-07-15 發送簡訊給我 |
|
KFC
一般會員 發表:43 回覆:73 積分:23 註冊:2003-03-27 發送簡訊給我 |
|
KFC
一般會員 發表:43 回覆:73 積分:23 註冊:2003-03-27 發送簡訊給我 |
|
timhuang
尊榮會員 發表:78 回覆:1815 積分:1608 註冊:2002-07-15 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |