• Post Reply Bookmark Topic Watch Topic
  • New Topic

condition for memory fragmentation in string buffer class  RSS feed

 
radha gogia
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanted to ask that when does memory fragmentation occur while we are using a string buffer class?
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never.

Question too difficult for “beginning”. Moving discussion.
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is unclear. When do you ever use a string buffer class? Do you mean this? You shouldn't use that: use this instead. What do you mean by fragmentation? That is something which happens on the hard drive. Does fragmentation ever occur where the StringBuilder object exists, which is in RAM?
Do you ever use a StringBuilder class? You only use instances of that class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!