[CoMoDev] Re: Garbage collection

  • From: "dick_grier Grier" <dick_grier@xxxxxxx>
  • To: comodev@xxxxxxxxxxxxx
  • Date: Thu, 18 Aug 2005 14:41:40 -0600

Hi Andrei,

I use StringBuilder even when concatenating only two strings, if all I want to do is to persist them (or display unmodified). The only hiccup comes when you have to fiddle with the string content. Then, the payback with SB may or may not be there.

My approach is to use a StringBuilder most of the time, and only to use the actual String(s) when I'm sure it is best (not too often), not concerned about string performance, or doing "one-of's".


Richard Grier (Microsoft MVP - Visual Basic)
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO  80228
303-986-2179 (voice)
303-593-9315 (fax)

Author of Visual Basic Programmer's Guide to Serial Communications, 4th Edition ISBN 1-890422-28-2 (391 pages) published July 2004. For faster service, contact the publisher at http://www.mabry.com/vbpgser4.

Other related posts: