Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxSqz File handle leaks?
Message
De
21/06/2005 10:05:26
 
 
À
21/06/2005 07:06:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01025081
Message ID:
01025147
Vues:
17
Hmm, not a bad idea - and almost guaranteed to fix the problem!
I was hoping to find a way to fix the issue within the .prg but I will keep this as a last resort.

I have started trying to play around with putting this in an object.
CD c:\temp\zip
lcFromPath = "c:\temp\zip\tozip\"
lcToPath = "c:\temp\zip\"
lnCount = ADIR(aFiles, lcFromPath + "*.*")

FOR iloop = 1 TO lnCount
	oProcess = CREATEOBJ('foxSqueeze')
	oProcess.FoxSqz("SCQ", lcToPath + "outfile.zip", lcFromPath + aFiles[iLoop,1])
	oProcess = ""
Next

=MESSAGEBOX("Finished")


DEFINE CLASS foxSqueeze AS custom
	Name = "foxsqz"

	PROCEDURE Init
		Set Libr To foxsqz5 Additive
		RETURN .t.
	ENDPROC

	Function FoxSqz
		LPARAMETERS tcParms, tcZipname, tcOutput 
		RETURN foxsqz(tcParms, tcZipname, tcOutput)
	ENDPROC

	PROCEDURE destroy
		RELEASE LIBRARY "Foxsqz5"
	EndProc
ENDDEFINE
But even this doesnt get cleared out when the object is destroyed :(

Oh and Borislav, yes the files can be deleted, and nothing shows under computer management / open files.


>Hi Will. How about putting the foxsqz routines into a seperate exe file. Then call/run the exe from your main app with the parameters of what it needs to do. Then the exe does the squeeze and exits clearing any resources used.
>
>hth
>
>
>>Hello All,
>>
>>I haven't been on here for a very long time so bear with me :)
>>
>>I have a exe running on a server which is using the 3rd party library foxsqz5.fll (I have tried a few different versions 1.9c, 1.9d).
>>
>>Each time it zips a file, the number of handles taken by VFP increases (can be seen in task manager by adding the "handle count" column.
>>
>>When a .exe starts taking around 40,000 file handles Windows starts acting funny.
>>
>>This is a sample
>>
>>lcFromPath = "c:\temp\zip\tozip\"
>>lcToPath = "c:\temp\zip\"
>>lnCount = ADIR(aFiles, lcFromPath + "*.*")
>>FOR iloop = 1 TO lnCount
>>	Set Libr To foxsqz5 Additive
>>	lnErrorCode = foxsqz("SCQ", lcToPath + "outfile.zip", lcFromPath + aFiles[iLoop,1])
>>	RELEASE LIBRARY "foxsqz5"
>>*!*		CLOSE ALL
>>*!*		FLUSH
>>*!*		SYS(1104)
>>Next
>>
>>=MESSAGEBOX("Finished")
>>
>>
>>I have tried the set/release library both inside and outside the for..loop
>>This product seems to be no longer supported (unless anyone knows differently?)
>>
>>So, my question is as follows:
>>Is there any way to stop a 3rd party .FLL from bloating VFP? can it be "contained"? maybe assigned to an object then released?
>>
>>Thanks in advance!
>>
>>Will
Will Jones
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform