Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OutOfMemory and StringBuilder
Message
De
13/01/2013 00:12:21
 
 
À
12/01/2013 04:53:37
Information générale
Forum:
ASP.NET
Catégorie:
Problèmes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01562245
Message ID:
01562343
Vues:
25
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform