Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OutOfMemory and StringBuilder
Message
From
13/01/2013 00:12:21
 
 
To
12/01/2013 04:53:37
General information
Forum:
ASP.NET
Category:
Troubleshooting
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01562245
Message ID:
01562343
Views:
24
>Not an answer to your question, but why do you use a StringBuilder() when you can do without ?
>
>I think this should be sufficient as the only statement of the method
>
>return tcSearchIn.Replace(tcSearchFor, tcReplace)
>
>
>Your approach creates a StringBuilder object, which creates a char array and both the char array and the StringBuilder have to be garbage collected at some point
>
>No big deal, but I couldn't help telling you

When I built the framework, I needed the equivalent of VFP StrTran() function. After many messages, we came to the conclusion that using that approach was better. It's like in VFP when using StrTran(), we would use it no matter how long the string is. So, the same applies here. In general, it is suppose to be more better in terms of performance but on certain strings, maybe not.

Maybe there is something better in the latest version of the .NET Framework. This was created on the first one.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform