Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2004, 12:47 AM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Memory Leak in ADO

Hi,

I am using ADO 2.0 in one of my application. One Ado connection has opened in form_load event and in one timer I am checking the entries in one of the table in every 100 ms interval. I am using the following code in the timer

Private timer1_timer()
dim LRST as adodb.recordset
set lrst=new adodb.recordset
lrst.open "select * from table",gc_connection,adopendynamic
do while not lrst.eof
   call process_data(lrst!id)
   lrst.movenext
loop
lrst.close
set lrst=nothing
end sub

The memory usage for this program is increasing time to time. After 24 hours I could see a major increase in the memory usage. While seeing this problem I upgraded my ADO to 2.8. Still I couldn't see any change in memory usage.

What may be the reason?

Any help would be appretiated.

Seeja

 
Old December 27th, 2004, 07:28 PM
Registered User
 
Join Date: Dec 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I'm no expert in this area...but my first guess would be that your not giving enough time(100ms = 1/10 of a second) for the code in your timer event to execute. Time your code(let me know if you need help with that) then set your interval in the timer accordingly.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak in a loop neilsands Java Basics 4 March 17th, 2010 05:59 AM
Looking for Memory Leak Advice Bill_Thompson Visual C++ 0 October 16th, 2007 05:42 PM
IE Memory Leak Jman82 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 July 6th, 2006 05:22 PM
Think I have a memory leak, need advice grantmeans Classic ASP Databases 1 March 12th, 2004 03:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.