You can always set the object to 'NOTHING' and then reinitialize it. Problem with this is that the object still resides in the memory location only it has its collection flag set to true so the GC can swing by and pick it up.
Considering the size of memory today, to manage memory just on a string level would be over-work. Unless you are going to process string information that is well over 2GB in size, there really is not need to worry about memory management. Even most modern games today dont even manage memory like they used to. Alot of components and object pre-built into .Net manage this for us, so we can focus on the solution at hand. On Jul 9, 11:35 pm, ankit m a cool dude with hot atitude <jainismru...@gmail.com> wrote: > Yes. This I can do. But as soon as sb.ToString() statement will be executed, > a new memory will be assigned to the result(string) and if this statement is > in loop, a number of memory blocks will be assigned which is totally wastage > of memory. There must be some way to flush the content of string or to > dispose the string object. -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to dotnetdevelopment@googlegroups.com To unsubscribe from this group, send email to dotnetdevelopment+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net