Consider that a string is immutable, that should steer you in the right
direction.

I'm not sure if you're referring to Win/Web (I presume Win), but the
maxlength property simply prevents more than n characters being entered, it
doesn't affect the contents of the text property.

Generally you don't need to worry too much about memory allocation in a
managed language as long as you follow some basic guidelines like not
holding on to references for too long etc.


On Mon, Oct 18, 2010 at 8:11 PM, Jeff Steinkamp (N7YG) <[email protected]>wrote:

>  How is memory allocated and set aside for the Text property in a
> TextBox?  From my research, a multi-line textbox can hold up to 2147483646
> characters, based on the amount of user memory available. So, when the
> textbox is created, is memory allocated for the full amount of characters it
> can hold or is memory allocated and reallocated as characters are added?
>
> If I was to set the MaxLength property to 20000, what will happen if I try
> to jam in more characters than the 20000 limit?  Will the stuff at the top
> of the stack get popped out or am I going to have to do that myself?
>
> As one who cut his teeth in Macro Assembler, I am always looking for ways
> to trim the memory footprint of my software and since this project has 9
> multi-line text boxes that get appended to every 256ms, this might be an
> area to look at.
>
> Jeff K. Steinkamp N7YG
> Tucson, AZ
> SCUD Missile Coordinates:
> N032-13-55.02  W110-55-52.79
> Registered Linux User: 420428
> ------------------------------------------------------
>
> Your report is concise, informative, and makes no sense. - Hawkeye
>

Reply via email to