Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Memory Leaks and FormatCurrency Alternative

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,54504
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Memory Leaks and FormatCurrency Alternative
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Memory Leaks and FormatCurrency Alternative - 12/18/2007 11:26:36 AM   
  carmichaelscott

 

Posts: 2
Score: 0
Joined: 11/18/2007
Status: offline
Hey,

I'm having some troubles with memory leaks on my site. I've gone through and checked that I'm closing all database connections and recordsets on each page.

Beyond that, I'm not really sure what to do.

I read in Microsoft help that some functions cause memory leaks, specifically FormatCurrency and Replace, which are used a lot in my site.

Does anyone know of or have alternate functions written to perform these tasks?

Anything else I can look for in regards to memory leaks?

Thanks in advance,

Scott
 
 
Post #: 1
 
 RE: Memory Leaks and FormatCurrency Alternative - 12/18/2007 3:42:21 PM   
  TNO


Posts: 1400
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
More specifically look at your codes interactions with DOM objects. Those are the primary sources of memory leaks but maybe this old post may help:

http://www.visualbasicscript.com/m_40532/mpage_1/key_memory%2cleak/tm.htm#40532

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to carmichaelscott)
 
 
Post #: 2
 
 RE: Memory Leaks and FormatCurrency Alternative - 12/18/2007 4:08:49 PM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi carmichaelscott,

though I'm not using VBScript for server side scripting -

(1) consider to upgrade to VBScript 5.7 (you may be lucky (or not))

(2) Replace() may be replaced by Regexp.Replace() (you pay with a loss of performance;
     reusing one RegExp object or creating many of of them may cause new problems)

(3) you can use a .NET StringBuffer to do fancy formatting

(4) you can use other ActiveScript languages (e.g. JScript/Javascript) for critical
     functions

Do you have test code (preferably plain command line .vbs) that demonstrates the
memory leaks?

Good luck! (considering your problem, you'll certainly need it)

ehvbs

(in reply to TNO)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Memory Leaks and FormatCurrency Alternative Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts