Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anybody using Codebase with VB?
Message
 
À
24/09/1999 08:11:55
Mark Hendricks
Centurytel Interactive Communications
Dallas, Texas, États-Unis
Information générale
Forum:
Visual Basic
Catégorie:
Produits tierce partie
Divers
Thread ID:
00267594
Message ID:
00268519
Vues:
22
Mark,

I had a similar problem initially in VB when writing a telecom app; basically the app was so busy that VB had no time to do housekeeping; and the app eventually brought down the system. VB of course can allocate memory dynamically and will eventually do garbage collection. The only help I can recommend without knowing the specifics are:

1) Make sure you are using statically allocated memory and variables. If you app is going to be busy, this is very important. Once your app is running, you can make sure by allocating all memory statically; the app mem size should almost never grow this way.
2) Use Set Object = Nothing to ensure that the objects are released; or dangling object references will eventually consume all available memory.

HTH,
Ed



>I have software written in C++ and VB using ADO with the ODBC provider. Using foxpro as a backend created problems because the data resided on the same system as the C++ application. The C++ software is multithreaded and basically acts as 16 users querying data every 10 seconds. Based on the initial query, each thread may assume processing of records in other tables in the database that are related to the initial query. The VB application uses ADO/ODBC and maintains the same data set. There are usually a couple of instances of the VB app running at any given time. A second instance of the C++ application runs on a different system emulating another 4 users. So I have 20 users connected to the data executing queries every 10 seconds and the other 2 users average a transaction every 2 minutes throughout the day.
>
>I have tried Foxpro and SQL Server as the back end under this scenario. Currently, we are using SS since that offloads the data processing to another system and we are only dealing with client requests on the 4 systems using the data. The problem is memory leaks. I have tested all of the UI code in my C++ application and verified that there are no leaks there. The leak seems to be coming from ADO. I have tried maintaining the ADO/ODBC connection for the life of each thread and opening/deleting for each use. I have tried various schemes of AddRef() and Release() to try to get ADO allocated memory to go away. All to no avail as the applications continue a slow leak which over a period of 8 hours or so; uses all available memory, consumes 100% of CPU utilization and hangs NT workstation.
>
>As far as I can tell, everything is current as far as the latest version of ADO and VC/VB are 6.0 SP3.
>
>Any suggestions are welcome.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform