Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6 SP3, ADO 2.5 memory leakage problem??
Message
De
14/08/2001 02:17:03
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
VFP 6 SP3, ADO 2.5 memory leakage problem??
Divers
Thread ID:
00543372
Message ID:
00543372
Vues:
46
I have developed backoffice application using plain VFP SP3 ( ver. 6.0.8492 ) with ADO 2.5 to be running on NT 4 SP6 PC.
I use connection to SQL Server ( via Microsoft SQL Server v. 3.70.08.20 ODBC driver) and connection to Lotus Notes ( via ODBC NotesSQL v.3.0).
My app is polling every 60sec meaning and checks for the connection to Lotus NOTES and connection to SQL Server with this peace of code:
this is form's method thisform.CheckConnection()

** start code
LOCAL oConNOTES, oConSQL, lReturn
glHandleError = .F.
lReturn = .f.
* here i check connection to Notes
* error handler will capture the ODBC error
* and return glHandleError = .T.
oConNOTES = CREATEOBJECT('ADODB.Connection')
WITH oConNOTES
.ConnectionString = "DSN=Activity"
.OPEN
ENDWITH
IF glHandleError && if i have an error error handler will return .T.
* we have an error lost connection to NOTES Domino Server set timer to 3 minitues and retry again
*glHandleError = .F.
oConNOTES = .NULL.
lReturn = .F.
* dejan 14 aug 01 explicitly release from memory
release oConNOTES
return lReturn && if connection to Notes failed we bailed out straight away
ELSE && everything is fine go on
oConNOTES.CLOSE
oConNOTES = .NULL.
lReturn = .T.
ENDIF

* create connection and open it if error then lReturn = .F.
oConSQL= CREATEOBJECT('ADODB.Connection')
WITH oConSQL
.Provider = "MSDASQL" && "sqloledb"
.Properties("Data Source").VALUE = "SmartForms" && "MOBILEIT" && test machine MOBILEIT
*oConn.Properties("Initial Catalog").Value = "Celesta" && what is the initial database
.Properties('User ID').VALUE='SFS'
.Properties('Password').VALUE='SFS'
.CursorLocation = 2 && adUseServer
.OPEN
ENDWITH
IF glHandleError && if i have an error error handler will return .T.
* we have an error lost connection to Celesta SQL Server set timer to 3 minitues and retry again
*glHandleError = .F.
oConSQL = .NULL.
lReturn = .F.
ELSE && everything is fine go on
oConSQL.close
oConSQL = .NULL.
lReturn = .T.
ENDIF
*dejan 14 Aug 01 explicitly release all references to objects from memory
release oConSQL , oConNOTES
return lReturn
** end code

I have an error handler routine which will return me glHandleError = .T. if i have an ODBC error.

Error Handler routine is placed in main.prg
Now my problem was that the user reported memory leakage everytime i try to made connection.
Every time it checks the connection (and is successful) it uses a few Meg of
memory then releases it. However it does not release ALL of it. There is
about 36K which is not released and remains assigned to the Connector
process ( my application ). Add this up each 60 second connect, and this equates to 50Meg a day of lost
memory.
My question is :
Is there a known bug with Visual Foxpro 6 SP3 and ADO 2.5 in reference to memory leakage?
Any idea on what to check or test would be appreciated.
Thanks.



Regards

Dejan Jocic
Dejanj@pacomsystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform