Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object Creation and Releasing (or not)
Message
De
03/09/2008 07:54:42
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Object Creation and Releasing (or not)
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01344428
Message ID:
01344428
Vues:
74
I have this in the Main program:
* JJ - Eligibility Project
_SCREEN.ADDPROPERTY("oXML")
_SCREEN.oXML = CREATEOBJECT("Microsoft.XMLHTTP")
Later, in other code I reference this object and use it's props, etc. with code like this:
	* Open POST
	_SCREEN.oXML.OPEN("POST", lcURL, .F.)

	* Set Headers
	_SCREEN.oXML.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
	_SCREEN.oXML.setRequestHeader("SOAPAction", "''")
	_SCREEN.oXML.setRequestHeader("authorization", cAuthenticate)

	TRY
		_SCREEN.oXML.SEND(submitRealtimeRequestXML)
		submitRealtimeRequestMessage = _SCREEN.oXML.ResponseText
At no point do I set it to NULL or recreate it. Should I be doing that? What is the best way to ensure that there are no memory leaks and that I'm using the object efficiently? I've noticed that over a period of time (hours maybe) that the object seems to go "dead" whereas I have to shut down and restart the app in order for the connection to work again. I'm not sure, but I think it's likely related to how I'm using this object. Or other similar ones.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform